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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I have an OpenAPI v2 yaml that is being converted to v3 by openapi-generator-cli, and it ends up changing the behavior of my models from allowing any freeform additional properties of any type, to only allowing properties of type object.
Basically, it should be treating additionalProperties: {} just like it treats additionalProperties: true, but instead it converts additionalProperties: {} incorrectly.
veqryn
changed the title
[BUG] Description
[BUG] Conversion from v2 to v3 incorrectly changes additionalProperties: {} into additionalProperties: type: object
Sep 16, 2024
Bug Report Checklist
Description
I have an OpenAPI v2 yaml that is being converted to v3 by openapi-generator-cli, and it ends up changing the behavior of my models from allowing any freeform additional properties of any type, to only allowing properties of type object.
Basically, it should be treating
additionalProperties: {}
just like it treatsadditionalProperties: true
, but instead it convertsadditionalProperties: {}
incorrectly.openapi-generator version
v7.8.0
OpenAPI declaration file content or url
My openapi v2 yaml includes:
Generation Details
openapi-generator generate -i ./awesome.swagger.yaml -g openapi-yaml -o ./openapiv3
This is converted by openapi-generator into this yaml:
Instead it should be generating this following:
Steps to reproduce
openapi-generator generate -i ./awesome.swagger.yaml -g openapi-yaml -o ./openapiv3
Using this openapi v2 yaml
Suggest a fix
This should be generated instead:
The text was updated successfully, but these errors were encountered: