KhronosGroup / KhronosGroup/glTF
Consider making the schema `$id` an absolute URI
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
Currently, the `$id` in the schemas just consist of a file name - for example, in [`accessor.schema.json`](https://github.com/KhronosGroup/glTF/blob/0f2d2a04e5a7f5313970c9c10811ec5e350563da/specification/2.0/schema/accessor.schema.json#L3)
"$id": "accessor.schema.json"
Section [8.2.1.1 of draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-core.html#section-8.2.1.1) says
> The root schema of a JSON Schema document SHOULD contain an "$id" keyword with an [absolute-URI](https://json-schema.org/draft/2020-12/json-schema-core.html#RFC3986) [[RFC3986](https://json-schema.org/draft/2020-12/json-schema-core.html#RFC3986)] (containing a scheme, but no fragment).
So these `$id`s 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.
Contributor guide
Research direction
Start by reviewing the root "$id" in specification/2.0/schema/accessor.schema.json and the other schema files. Compare the proposed absolute-URI convention with the schemas published at schema.khronos.org. The work is done when the schema identifiers follow an agreed absolute-URI convention consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100