-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Section Initial Base URI contradicts referenced RFC3986 #745
Comments
@Relequestual see PR #686 and python-jsonschema/jsonschema#343 (comment) for why this language was added. I don't really follow how why this is a contradiction. Your first assumption of the base URI is the retrieval URI. The way that precedence diagram works is that you start from the outermost layer (application specific) which is modified or overridden as you go towards the innermost layer. To use a JSON Schema example, if the The wording as given is correct. I avoided the words "may" or "should" even in lower-case intentionally, because we are talking about things that happen, not recommendations or requirements. |
But... just above the precedence diagram (that I was looking at anyway)...
You've said outer to inner, but RFC3986 says it's inner to outer. |
@Relequestual yes, the innermost layer that is relevant produces the base URI. But to get there you start from the outermost layer and work your way in. You don't have to actually do that as steps, but conceptually that's how it works. How else would you interpret |
After discussing this with @handrews on slack, I now understand. I'll consider if there's a way to make this clearer of if I was just having a dumb day. |
This is more a comment for me to make sure I make a PR agains the validation document.
Section title "Initial Base URI" states that...
But also that...
The point of referencing the RFC is so we don't have to include all the content, however in this case it reads to me as a contradiction.
The order of precedence in RFC3986 says first look for a base URI embedded in the contnet, which for JSON Schema is $id. Prefixing "informativly" to the scentence does not prohibit that it seems to be stating the "base URI of a schema is the location where the schema is found", which the third order of precedence according to RFC3986.
It should be clear in saying that the base URI in relation to "URI used to retrieve the entity" as per RFC3986 order of precedence in determining base URI, may be a network location, a local file system, or something else.
It could also be useful to note that a base URI must also conform to an absolute-uri, syntax as defined in said RFC, which inclues a URI schema, which for a local filesystem is the file URI schema, defined by RFC8089.
The text was updated successfully, but these errors were encountered: