json-schema-org / json-schema-org/website

[📝 Docs]: Example for required properties in Getting Started is misleading

Open
#1,399 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📝 Documentation Status : In Discussion
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 the exclusiveMinimum validation keyword and set the value to zero:
[...]
3. Add the required validation 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:

https://github.com/json-schema-org/website/blob/57a389494b76a88342abde5fc27d9a308097db0b/pages/learn/getting-started-step-by-step/getting-started-step-by-step.md?plain=1#L171-L212

Code of Conduct
  • I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.