OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.32k stars 6.45k forks source link

[BUG][CLOJURE] Clojure fails with java.lang.ClassCastException #18199

Closed njerig closed 5 months ago

njerig commented 6 months ago

Bug Report Checklist

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
  1. Clone plaid-openapi
  2. Install OpenAPI Generator CLI v7.4.0
  3. Run the above command (in "Generation Details")
Suggest a fix

from ClojureClientCodegen.java#L174:

Schema inner = (Schema) p.getAdditionalProperties();

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.

wing328 commented 6 months ago

can you please file a PR with the suggested fix?