-
-
Notifications
You must be signed in to change notification settings - Fork 308
JSON Schema Core - 11.2/13.1, 13.2 - inconsistent treatment of multiple schema items #832
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
Comments
11.2 needs to be fixed, thanks. |
@handrews I would imagine this SHOULD be "at least one of", right? Consider the expansion into multiple vocabuarlies or even providing multiple draft versions. Are you in agreement? |
@Relequestual yes, "at least one of." The other change is that it needs to talk about |
…am `schema` consistent with section 13.1 and 13.12 Fixes json-schema-org#832
Referenced the wrong issue in my PR... oops! |
OK, I forgot some stuff and now it's coming back to me. Ideally, with media type parameters we want to be able to both ask for "I want something that is valid against all of schemas X, Y, and Z" and be able to ask for "I want something that is valid against schema A or B or C". So the idea was that a space-separated list of schemas in the media type paramter was the AND, and then using multiple Accept header values was the OR, so given:
this was to mean "I would like an instance that either satisfies X AND Y AND Z, or it satisfies W (or all four). That works fine on The idea behind saying the space-separated "X Y Z" meant at least one had to do with content negotiation and versioning. Something about representations likely conforming to multiple versions, but not knowing exactly which? I'm struggling to remember the use case now. It might be in the text but it's not jumping out at me at the moment. So let's think this through in terms of requirements:
I need to think a bit more on this. For example, is there a solution allowing you to ask for something that is both a boat (v1, v2, or v3) and an airplane (v1.2, v2, or v2.2)? Is that even desirable? At some point this gets too complex. |
This meakes sense to me, inc your requirements laid out. |
In the interest of being able to publish draft 2020 without undue delay, I'm removing these parts from the spec. |
Not convinced it was used and there are outstanding questions we should look to resolve should they be re-added. I understand they were mainly for use with HyperSchema, although I can see utility if they are well and clearly defined. Look at #832 should they want to be re-added.
Removal commit for reference: 5eda485 |
JSON Schema Core, 11.2, about the media type parameter "schema":
"Multiple schemas are whitespace separated, and indicate that the instance conforms to all of the listed schemas:"
This statement is followed by an example using content type "application/json".
In 13.1 and 13.2, however, dealing with media types "application/schema+json" and "application/schema-instance+json", the role of the media type parameter "schema" is defined slightly differently:
"The instance SHOULD successfully validate against at least one of these meta-schemas." (13.1)
"The instance SHOULD successfully validate against at least one of these schemas." (13.2)
PROPOSAL
The text was updated successfully, but these errors were encountered: