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

utility: given a schema document, unroll the $refs within #58

Open
karenetheridge opened this issue Sep 18, 2023 · 0 comments
Open

utility: given a schema document, unroll the $refs within #58

karenetheridge opened this issue Sep 18, 2023 · 0 comments

Comments

@karenetheridge
Copy link
Owner

Replace each $ref with its definition and return the resulting schema. This could be useful for code generation or other tools that require very simplistic schema definitions.

This will break down if there are circular or recursive references, so make sure to use a max depth counter and abort if it's hit.

This will probably work as-is for OpenAPI documents too, since ref resolution works the same way there.

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