Description
The spec references RFC-3986 for how to determine the base URI for relative reference resolution. It also has a concept of an "initial Base URI". This concept unnecessarily complicates the model and should be removed. The concepts of retrieval URI and default base URI as defined in RFC-3986 are enough.
The initial base URI can be viewed as essentially the retrieval URI and the default base URI compressed into one step and determined by the user. Presenting these as one step is at best confusing, especially if we want to encourage implementers to provide more robust schema identification features such as was proposed in #1299. For example, it makes sense to allow a user to set a default base URI as a global configuration and a retrieval URI per schema. Some implementations may allow you to set a retrieval URI, but not a default base URI, or vice versa.
Additionally, an "initial base URI" can be ambiguous. If it's a retrieval URI, a user should expect the schema to be referenceable by that URI. If it's a default base URI, the user shouldn't expect it to be referenceable by that URI. If the implementation only takes an "initial base URI", it can't know the difference.
It could be argued that the "initial base URI" concept is still there in these more robust cases, it's just calculated within the implementation rather than as a single input by the user. However, it's unclear in the spec that that's a choice implementers have let alone something they should do. If we stick to RFC-3986 concepts, it's more clear to implementers what they are allowed to do and what they should be doing it their implementations.
Reference: https://json-schema.org/draft/2020-12/json-schema-core.html#section-9.1.1
Metadata
Metadata
Assignees
Labels
Type
Projects
Status