Skip to content
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

Support YAML anchors for static files #1237

Open
snazy opened this issue Sep 2, 2022 · 2 comments
Open

Support YAML anchors for static files #1237

snazy opened this issue Sep 2, 2022 · 2 comments

Comments

@snazy
Copy link
Contributor

snazy commented Sep 2, 2022

OpenApiProcessor uses Jackson, which does not support YAML anchors.

(OpenAPITools sample, Jackson issue (stale))

It would be possible to support YAML anchors directly in smallrye-open-api by "preprocessing" a YAML file with snakeyaml.

I'm not sure how much appetite there is to have this kind of change. IMO if it's added to smallrye-open-api, then it should be hidden behind a toggle at least, or better using another io.smallrye.openapi.runtime.io.Format type.

The cleaner solution would probably be to add support for YAML anchors to Jackson.

@MikeEdgar
Copy link
Member

@snazy thanks for opening this. Is the expectation that the anchors would be supported when reading a static file, but not present in the final OpenAPI model -- since they would be lost in the object structure after de-serializing?

@snazy
Copy link
Contributor Author

snazy commented Sep 2, 2022

It would be fine for us to lose the anchors in the generated output, I can only speak for "projectnessie" though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants