OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[x] What's the actual output vs expected output?
Expected: a Plaid client is produced
Actual output:
Exception in thread "main" java.lang.RuntimeException: Could not process model 'ProfileGetResponse'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:540)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1226)
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.ClassCastException: class java.lang.Boolean cannot be cast to class io.swagger.v3.oas.models.media.Schema (java.lang.Boolean is in module java.base of loader 'bootstrap'; io.swagger.v3.oas.models.media.Schema is in unnamed module of loader 'app')
at org.openapitools.codegen.languages.ClojureClientCodegen.getTypeDeclaration(ClojureClientCodegen.java:174)
at org.openapitools.codegen.DefaultCodegen.fromProperty(DefaultCodegen.java:4130)
at org.openapitools.codegen.DefaultCodegen.fromProperty(DefaultCodegen.java:3931)
at org.openapitools.codegen.DefaultCodegen.addParentContainer(DefaultCodegen.java:5838)
at org.openapitools.codegen.DefaultCodegen.addAdditionPropertiesToCodeGenModel(DefaultCodegen.java:3722)
at org.openapitools.codegen.DefaultCodegen.updateModelForObject(DefaultCodegen.java:2966)
at org.openapitools.codegen.DefaultCodegen.fromModel(DefaultCodegen.java:3188)
at org.openapitools.codegen.languages.ClojureClientCodegen.fromModel(ClojureClientCodegen.java:205)
at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1681)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:535)
... 4 more
Description
The output is above and command to generate the output is below.
This always suggests that getAdditionalProperties always returns a Schema object when it can also return a Boolean. Extra handling for the types might be needed.
Bug Report Checklist
[x] What's the actual output vs expected output? Expected: a Plaid client is produced
Actual output:
Description
The output is above and command to generate the output is below.
openapi-generator version
v7.4.0
OpenAPI declaration file content or url
https://github.com/plaid/plaid-openapi/raw/master/2020-09-14.yml
Generation Details
openapi-generator-cli generate -g clojure -i 2020-09-14.yml -o build/generated-clojure
Steps to reproduce
Suggest a fix
from ClojureClientCodegen.java#L174:
This always suggests that getAdditionalProperties always returns a Schema object when it can also return a Boolean. Extra handling for the types might be needed.