-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yaml anchors (using &) and references (using *) #1593
Comments
I have the same problem, here's a minimal example: x-my-anchors:
public: &public []
/my/endpoint:
security: *public gives Reason is probably a bug in Jackson YAML, like mentioned here: https://stackoverflow.com/questions/46689801/yaml-jackson-anchor-keys-of-array . |
It's not a "bug" per se, it's because the official YAML specification doesn't specify the merge key ( Really wish this was supported... |
Not only So basically, the most recent OpenAPI generator CLI 5.3.1 on the time of writing (Dec 2021) doesn't support normal YAML with references and anchors. What I personally consider as an insult of the common sense.
Yeah, so one has to preprocess the APIs, adding extra step in the builds. |
Hi @OnkelTem, I also got this issue when using go-openapi https://github.com/go-openapi |
Description
I have problem with using anchors (using &) and references (using *) in my Openapi file.
I have to generate a file without anchors and references , and only then there is a successful generation.
openapi-generator version
3.3.4
OpenAPI declaration file content or url
Command line used for generation
docker run --rm -v %CD%:/local openapitools/openapi-generator-cli generate -i /local/resources/ati.su/swagger.yaml -g php -o /local/app/resources/ati-sdk --invoker-package Ati
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: