json-schema-org / json-schema-org/website
[📝 Docs]: Example for required properties in Getting Started is misleading
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
What Docs changes are you proposing?
I was just quickly looking up how to define a property as required and skimming through the Getting Started for that, where I read in the corresponding section:
To define a required property:
[...]
2. Add theexclusiveMinimumvalidation keyword and set the value to zero:
[...]
3. Add therequiredvalidation keyword to the end of the schema
Not thinking too much about it, I read this as "exclusiveMinimum=0 means that there must be at least one item of this" -- but in fact this keyword refers to the value. The example should be changed here to not be misleading.
Code reference:
Code of Conduct
- I agree to follow this project's Code of Conduct
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open pages/learn/getting-started-step-by-step/getting-started-step-by-step.md and review the "define required properties" section around lines 171-212. Clarify the example so exclusiveMinimum is not confused with the required keyword, then verify the updated Getting Started page renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100