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

linting feature: traverse a schema for $refs, and identify any that reference unknown resource locations #77

Open
karenetheridge opened this issue Aug 4, 2023 · 1 comment

Comments

@karenetheridge
Copy link
Owner

When processing a schema, it can be helpful to know if there are any internal references to other schema documents, in order to determine if anything needs to be fetched from the network/disk/whatever in advance of evaluation (because we don't fetch documents in realtime).

This can be done easily enough with a traverse call with a $ref callback that knows how to resolve references. It could present the result as two lists of absolute URIs - those that are "known" and those that are not.

(This same method could then be reimplemented on the subclass, JSON::Schema::Modern::Document::OpenAPI, with special knowledge of how to traverse openapi documents.)

@karenetheridge
Copy link
Owner Author

This can be done after #51, which involves tracking all known schema locations in a document.

@karenetheridge karenetheridge changed the title feature: traverse a schema for $refs, and identify any that reference unknown resource locations linting feature: traverse a schema for $refs, and identify any that reference unknown resource locations Dec 9, 2023
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