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

Embedded "$schema" with different values in draft 2020-12 #59

Open
handrews opened this issue Feb 26, 2023 · 0 comments · May be fixed by #87
Open

Embedded "$schema" with different values in draft 2020-12 #59

handrews opened this issue Feb 26, 2023 · 0 comments · May be fixed by #87

Comments

@handrews
Copy link
Contributor

2019-09 and 2020-12 both allow "$schema" alongside an embedded "$id". 2019-09 states that all such embedded "$schema" keywords SHOULD have the same value as the "$schema" in the document root, but 2020-12 allows changing it, which requires some finagling when it comes to validating schemas against their meta-schemas.

Changing the value of "$schema" in an embedded resource is an unusual use case and, AFAICT, not understood by most people much less supported - it was meant to support complex bundling use cases, and one can always un-bundle the schemas to work around lack of support. Raising a NotImplementedError with a clear message would probably not be unreasonable. The JSON Schema test suite does not test this functionality at this time.

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

Successfully merging a pull request may close this issue.

1 participant