-
Notifications
You must be signed in to change notification settings - Fork 1
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
bundle a schema together with all of its references #16
Comments
Injecting |
This requires a more sophisticated traversal mechanism, as we need to walk a schema in order to identify all its |
This is now possible, using the callback hooks in 'traverse'. We can use a hook on This code would belong in JSON::Schema::Modern::Document, and be heavily used by JSON::Schema::Modern::Document::OpenAPI for things like "give me the openapi document, but only things suitable to show to users with authentication role foo" or "...only paths with tag bar". |
If one schema has $refs to another in another document, it might be desirable to package all the referenced schemas up as definitions in the first schema as a single point of reference.
$schema
declarations, then allow changing $schema in resource subschemas #12 is required first. (In the simplest case, we can just die if $schema declarations are different.) This also requires that the referenced resources have $ids as $schema cannot occur in a subschema without $id.see https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.appendix.B.1
The text was updated successfully, but these errors were encountered: