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

Consider making the schema $id an absolute URI #2182

Open
javagl opened this issue Jul 3, 2022 · 1 comment
Open

Consider making the schema $id an absolute URI #2182

javagl opened this issue Jul 3, 2022 · 1 comment
Milestone

Comments

@javagl
Copy link
Contributor

javagl commented Jul 3, 2022

Currently, the $id in the schemas just consist of a file name - for example, in accessor.schema.json

"$id": "accessor.schema.json"

Section 8.2.1.1 of draft 2020-12 says

The root schema of a JSON Schema document SHOULD contain an "$id" keyword with an absolute-URI [RFC3986] (containing a scheme, but no fragment).

So these $ids should probably be changed to be an absolute URI.

While it might technically be valid to use an 'arbitrary' URI, this should probably be synchronized with publishing these schemas at https://schema.khronos.org/ . The schema files are not part of the normative specification, so it should even be possible to change this without any issues of ratification.

@javagl
Copy link
Contributor Author

javagl commented Jul 7, 2022

I knew that this had been mentioned somewhere earlier, and just found it: #2049 (comment) - it may make sense to still track this specific point about the $id here.

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

2 participants