You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to generate C# output using the GenericHost library I get an exception. java.lang.IllegalArgumentException: Comparison method violates its general contract!
If I remove some property from the component schema or if I remove some required properties, the error goes away.
It looks like the specific combination of properties in the file somehow cause the error.
This is the whole error:
Exception in thread "main" java.lang.RuntimeException: Could not process model 'MixLog'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:542)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1228)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:535)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.TimSort.mergeLo(TimSort.java:781)
at java.base/java.util.TimSort.mergeAt(TimSort.java:518)
at java.base/java.util.TimSort.mergeCollapse(TimSort.java:448)
at java.base/java.util.TimSort.sort(TimSort.java:245)
at java.base/java.util.Arrays.sort(Arrays.java:1308)
at java.base/java.util.ArrayList.sort(ArrayList.java:1804)
at java.base/java.util.Collections.sort(Collections.java:178)
at org.openapitools.codegen.languages.CSharpClientCodegen.fromModel(CSharpClientCodegen.java:469)
at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1683)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:537)
... 4 more
Bug Report Checklist
Description
When trying to generate C# output using the GenericHost library I get an exception.
java.lang.IllegalArgumentException: Comparison method violates its general contract!
If I remove some property from the component schema or if I remove some required properties, the error goes away.
It looks like the specific combination of properties in the file somehow cause the error.
This is the whole error:
openapi-generator version
7.5.0
OpenAPI declaration file content or url
https://gist.github.com/marcselman/78b1516e5a15c92da70a31c851c11c6c
Generation Details
The text was updated successfully, but these errors were encountered: