-
-
Notifications
You must be signed in to change notification settings - Fork 309
Do non-LDO keywords belong in Hyper-Schema? #363
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
I think they'd be better elsewhere, probably in the "validation" document.
Could be in "Metadata keywords" section of validation spec. I think it'd make sense to have them along with "default" and "examples".
Could be in a section in its own like is "format". (I also often wanted to to use it without hyper-schema.) |
Having since taken a quick pass at clarifying the scope and nature of Hyper-Schema in PR #366, it's even more obvious how I had to tack on extra wording to explain why these are there. Without these, you can talk about Hyper-Schema just as a serialization of the abstract Web Linking model, attached to the link context via JSON Schema validation. Which seems very nice and focused to me. I agree with your ideas about where to put them. It also occurs to me that "media" could be a format, although there are some things to think through for that, and it's probably better to keep it separate. |
Henry Andrews a écrit :
I agree with your ideas about where to put them. It also occurs to me
that "media" could be a format, although there are some things to think
through for that, and it's probably better to keep it separate.
If the idea gets a general approval, I can commit to write a PR.
|
@dlax it would be great if you could write a PR :-) I think there are a few things to hammer out (and I want to let other folks have a chance to comment- given the radio silence from a few of the usual suspects I suspect summer vacations are going on right now). For We don't have to resolve those before moving the properties, but if we do those things, it would be best to do both them and the move in this draft. For I'm not all that attached to any of these options, just want to kick them around while we give folks a chance to see this. |
@dlax I dug through all of the old drafts and discovered something interesting: what's now I think the original approach was better, perhaps with I also now think that it would be best to keep this separate from @dlax does this sound reasonable to you? If so, a PR removing Let's hold off on switching |
Feel free to do a PR now, but be aware that since this has only been up for a few days, other team members may pop up and shoot it down. We can also leave this open for a while for further comment. A PR like this with implications for implementors will need to stay open for a minimum of 14 days for feedback (which is why I haven't merged |
We move the description and schema definition of "readOnly" verbatim from the Hyper-Schema specification (and meta-schema) to the validation one, in the "Metadata keywords" section (along with "default", in particular). This addresses part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "readOnly" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model.
@handrews Just submitted a PR about |
We move the description and schema definition of "readOnly" verbatim from the Hyper-Schema specification (and meta-schema) to the validation one, in the "Metadata keywords" section (along with "default", in particular). This addresses part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "readOnly" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model.
…alidation Definition of "media" property (an object in Hyper-Schema) is moved into two properties "contentMediaType" and "contentEncoding" in the validation specification. This addresses the other part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "media" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model. The new keywords are described in a dedicated section "String-encoding non-JSON data". Part of the previous content was moved into a forewords section.
…alidation Definition of "media" property (an object in Hyper-Schema) is moved into two properties "contentMediaType" and "contentEncoding" in the validation specification. This addresses the other part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "media" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model. The new keywords are described in a dedicated section "String-encoding non-JSON data". Part of the previous content was moved into a forewords section.
We move the description and schema definition of "readOnly" verbatim from the Hyper-Schema specification (and meta-schema) to the validation one, in the "Metadata keywords" section (along with "default", in particular). This addresses part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "readOnly" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model.
…alidation Definition of "media" property (an object in Hyper-Schema) is moved into two properties "contentMediaType" and "contentEncoding" in the validation specification. This addresses the other part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "media" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model. The new keywords are described in a dedicated section "String-encoding non-JSON data". Part of the previous content was moved into a forewords section.
…alidation Definition of "media" property (an object in Hyper-Schema) is moved into two properties "contentMediaType" and "contentEncoding" in the validation specification. This addresses the other part of json-schema-org#363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "media" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model. The new keywords are described in a dedicated section "String-encoding non-JSON data". Part of the previous content was moved into a forewords section.
[Marked as a question b/c I have no proposal I am pushing here- this has just come up several times so we should clarify whether that involves a spec change or not]
Several hyper-schema keywords could potentially be used without using
"base"
or"links"
/LDOs. Are they in the right place?"readOnly"
and"deprecated"
are useful for any sort of data definition, including resources managed in a local database (typically not managed as hypermedia)"media"
is not unlike"format"
in that it provides additional information on interpreting a primitive data type. At least one discussion here has involved someone wanting to use"media"
without any other Hyper-Schema features (I'll link to it next time I run across it, i don't remember where it is now)This issue can be split if the discussions for different keywords go in different direction.
An alternative would simply be to offer guidance (perhaps on the web site) on whether and how implementations can use part of Hyper-Schema. Declaring something to be a Hyper-Schema (via
"$schema"
and simply not using"base"
and"links"
may be the right answer, and we just need to clearly document that. The only requirement would be the obvious one that such usage cannot re-define those keywords.This parallels discussions in the UI and code generation vocab discussions, which are talking about restricting usage of validation keywords.
The text was updated successfully, but these errors were encountered: