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
Exception in thread "main" java.lang.RuntimeException: Could not process model 'Purge'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:496)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1005)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:431)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
Caused by: java.lang.ClassCastException: java.time.OffsetDateTime cannot be cast to java.lang.String
at org.openapitools.codegen.languages.PythonClientCodegen.toExampleValueRecursive(PythonClientCodegen.java:724)
at org.openapitools.codegen.languages.PythonClientCodegen.toExampleValue(PythonClientCodegen.java:703)
at org.openapitools.codegen.DefaultCodegen.fromProperty(DefaultCodegen.java:2846)
at org.openapitools.codegen.DefaultCodegen.addVars(DefaultCodegen.java:4534)
at org.openapitools.codegen.DefaultCodegen.addVars(DefaultCodegen.java:4482)
at org.openapitools.codegen.DefaultCodegen.fromModel(DefaultCodegen.java:2[378](https://github.com/pulp/pulpcore/actions/runs/4224067517/jobs/7334573002#step:8:379))
at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1289)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:491)
... 4 more
Error: Process completed with exit code 1.
Upgrade
openapi-generator-cli
to version >=5.0.0.Currently used python client
openapi-generator-cli
v4.3.1 contains bugjava.time.OffsetDateTime cannot be cast to java.lang.String
. This is fixed in version 5.0.0.Related issues: OpenAPITools/openapi-generator#6694, OpenAPITools/openapi-generator#6433.
PR fix: OpenAPITools/openapi-generator#6458
Taken from pulp/pulpcore#3564 (comment)
(CI job: https://github.com/pulp/pulpcore/actions/runs/4224067517/jobs/7334573002)
It would be worth upgrading to the latest or at least version >=5.0.0 to fix this, even with possible breaking changes.
The text was updated successfully, but these errors were encountered: