OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
I'm geneating the defintions files with tsoa, I also opened an issue at tsoa's github page, and we checked that the issue is definitly not related to tsoa itself. The swagger file is valid, the generator seems to produce broken output here. See also https://github.com/lukeautry/tsoa/issues/474
Steps to reproduce
generate html2 docuematation with the open api defintion file:
there are some issues reagrding "oneOf", but none that describes this bug in my opinion.
Suggest a fix
Unfortunatnely no idea how to fix this.. I assume it is something in the underlying library, due to the fact that a lot of output modes are affected (not only html2, also e.g. php client,..).
Bug Report Checklist
Description
I've reported the issue already at the swagger-api, but swithed to this fork recently, unfortantely the issue is not solved here either.
Swagger Definition 2 works! https://test.hokify.com/ats-api/swagger.yaml Swagger Deifntion 3 / Open API is broken when using "oneOf" with strings and objects. https://test.hokify.com/ats-api/openapi.yaml
running
java -jar /opt/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i dist/swagger/swagger.yaml -g html2 -o docs
generated a broken html2 output.
If I remove the occurences of "oneOf" and replace them by "type: string" it starts working.
1.
openapi-generator version
Building via docker openapitools/openapi-generator-cli:latest (updated 4 hours ago)
OpenAPI declaration file content or url
Swagger Definition 2 works! https://test.hokify.com/ats-api/swagger.yaml Swagger Deifntion 3 / Open API is broken when using "oneOf" with strings and objects. https://test.hokify.com/ats-api/openapi.yaml
Command line used for generation
I'm geneating the defintions files with tsoa, I also opened an issue at tsoa's github page, and we checked that the issue is definitly not related to tsoa itself. The swagger file is valid, the generator seems to produce broken output here. See also https://github.com/lukeautry/tsoa/issues/474
Steps to reproduce
generate html2 docuematation with the open api defintion file:
java -jar /opt/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i dist/swagger/swagger.yaml -g html2 -o docs
Related issues/PRs
there are some issues reagrding "oneOf", but none that describes this bug in my opinion.
Suggest a fix
Unfortunatnely no idea how to fix this.. I assume it is something in the underlying library, due to the fact that a lot of output modes are affected (not only html2, also e.g. php client,..).