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

[oas2tson] Ref handling #210

Open
simoneb opened this issue Apr 15, 2024 · 0 comments
Open

[oas2tson] Ref handling #210

simoneb opened this issue Apr 15, 2024 · 0 comments

Comments

@simoneb
Copy link
Member

simoneb commented Apr 15, 2024

From @toomuchdesign:

In my own project I've finished implementing three resolution strategies for refs: import, inline, and keep. Currently, oas2tson implements inline.

  • Import is interesting because it allows importing only the necessary subtrees.
  • Keep doesn't resolve the refs (leaves them as they are), but it's potentially useful for registering schemas individually in Fastify and exposing an OpenAPI definition with the individual components defined (and not inline). There are some limitations in Fastify/Swagger that prevent achieving this currently, but I believe we'll get there in the future. Additionally, json-schema-to-ts is potentially able to resolve the types of schemas linked via ref.
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

1 participant