Skip to content

Add example(s) to json-schema-validation.html #664

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

Closed
MNF opened this issue Oct 18, 2018 · 4 comments
Closed

Add example(s) to json-schema-validation.html #664

MNF opened this issue Oct 18, 2018 · 4 comments

Comments

@MNF
Copy link

MNF commented Oct 18, 2018

The page https://json-schema.org/latest/json-schema-validation.html describes many different keywords, but there is no example, how such keywords are used.
It can be one schema example,which includes all described keywords or (better, but more time consuming) multiple examples, showing variations of possible values for different keywords.

@awwright
Copy link
Member

awwright commented Oct 19, 2018

We've tended to find that if there's too much informative/non-normative content in the official specification (descriptions of why things are, or examples), it tends to drown out the authoritative/normative content.

I think we can consider adding some examples, if there's particular areas that need improvement. Are there specific keywords/sections that need improvement?

Do you have examples of other RFCs or standards documents that provide more examples than we do?

We do realize the need for examples, so we separately publish a few different documents with this goal:

Is this suitable for you?

@Relequestual
Copy link
Member

@MNF Thanks for raising this issue.
I can understand that reading normative specification language is hard, and it's not nessecerily that helpful for thos wishing to actually write JSON Schema documents. It's a hard skill to learn, and takes time.

Having complete informative information in with the normative specification document is asking for trouble! This is from experience.

If you would like some more examples, please be specific, and ask for them over on the Understanding JSON Schema repo, which is the associated informative information for this specification.

@MNF
Copy link
Author

MNF commented Oct 19, 2018

@awwright ,
example of RFC with more non-normative examples is
https://openid.net/specs/openid-connect-core-1_0.html#TokenErrorResponse where multiple sections contain
The following is a non-normative example request

@Relequestual , I didn’t ask to have “complete informative information”. However
I came to the document from google and expected to have al least one example of “additionalProperties“ within the document.

Also it will be good to have in the same document (probably in “Note for readers”) the references to
https://github.com/json-schema-org/understanding-json-schema and
https://github.com/json-schema-org/JSON-Schema-Test-Suite as you did in your replies.

@handrews
Copy link
Contributor

handrews commented Nov 9, 2018

We already link to json-schema.org in the introductory text, and per json-schema-org/json-schema-org.github.io#233 "Understanding JSON Schema" should be linked from there.

If someone has time to come up with a reasonable balance for examples and submit a PR, I'd love to see it. But this is a volunteer project and getting the next draft out is all we have bandwidth for right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants