-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
Hyper-Schema examples: wrong, confusing, or changed? #97
Comments
Or just make the example have two instances, each of which fits the current schema. Instead of stuffing them in an array. |
@jdesrosiers Yeah, it looks like this needs a lot of cleanup. Unfortunately Hyper-schema didn't get nearly as much love as "core" did. The only interpretation that makes sense is it's providing an array of instances, each can be described by the schema. The "base" keyword has the most up-to-date example in the document, does that form sense you you? |
Yes, that one looks right. |
This addresses issue json-schema-org#97, where it was noted that "The only interpretation that makes sense is it's providing an array of instances, each can be described by the schema." This makes the schema an array schema, and replaces the "self" link with the more correct (or at least less confusing in this context) "item" link. Also fix a "the the" typo in the security considerations section, and make "hyper-schema" consistent.
This addresses issue json-schema-org#97, where it was noted that "The only interpretation that makes sense is it's providing an array of instances, each can be described by the schema." This makes the schema an array schema, and replaces the "self" link with the more correct (or at least less confusing in this context) "item" link. Also fix a "the the" typo in the security considerations section, and make "hyper-schema" consistent.
If you think the PR doesn't "fix" this issue, please reopen. |
This example is either wrong, confusing, or significantly changes the semantics of Hyper-Schema. All of the examples look like this, so I'm concerned.
Wrong
This Hyper-Schema and JSON Document do not match up in a meaningful way. The links apply to the array, not the items in the list. An array has no property "id" or "upId", so neither of these links will apply.
Confusing
Maybe you intended that the Hyper-Schema was a segment of the full Hyper-Schema describing this resource and that the LDO applied to each item in the list. In that case, the example is confusing and misleading.
Changed
The other option is that you changed the semantics of how LDO's work in a way that is not well documented.
A Hyper-Schema that correctly describes the JSON Document in the example would look like this.
The text was updated successfully, but these errors were encountered: