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: https://github.com/OpenAPITools/openapi-generator/issues/6694, https://github.com/OpenAPITools/openapi-generator/issues/6433. PR fix: https://github.com/OpenAPITools/openapi-generator/pull/6458Taken from https://github.com/pulp/pulpcore/pull/3564#issuecomment-1437083254
(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.