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
There is a bug in the reading of vendor extensions applied to properties when the property is a referenced object.
In this case the extensions are ignored. I have checked it against a variety of languages and the effect is the same across all of them, so the problem is probably in the swagger parser, but I thought it should be reported here as it manifest as a bug here, even if the source is in another tool.
openapi-generator version
I have check it in
4.3.0
5.3.0
6.2.1
Didn't check master as there is no sign its been considered and it is probably a problem with the swagger parser.
OpenAPI declaration file content or url
To illustrate the problem consider the following schema:
I have checked several other languages and it is all basically the same. I think the swagger parser, when its sees a reference it does not bother the read and/or pass back the extensions, but in the case of in-line processes it does. In the case of C# x-emit-default-value and x-is-value-type are added by the generator, so only the schema present entries are missing.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
There is a bug in the reading of vendor extensions applied to properties when the property is a referenced object.
In this case the extensions are ignored. I have checked it against a variety of languages and the effect is the same across all of them, so the problem is probably in the swagger parser, but I thought it should be reported here as it manifest as a bug here, even if the source is in another tool.
openapi-generator version
I have check it in
Didn't check master as there is no sign its been considered and it is probably a problem with the swagger parser.
OpenAPI declaration file content or url
To illustrate the problem consider the following schema:
Generation Details
I have tried it with
and with additional properties set to
as well as no additional properties.
Steps to reproduce
If you look at the relevant parameters of the JSON generated from the above schema which is passed to the mustache template, you get the following:
C#
Rust
Python Flask
Related issues/PRs
Couldn't find any.
Suggest a fix
I have checked several other languages and it is all basically the same. I think the swagger parser, when its sees a reference it does not bother the read and/or pass back the extensions, but in the case of in-line processes it does. In the case of C#
x-emit-default-value
andx-is-value-type
are added by the generator, so only the schema present entries are missing.The text was updated successfully, but these errors were encountered: