Skip to content

Commit

Permalink
docs: refactor to improve legibility
Browse files Browse the repository at this point in the history
The use of "not more" with the reverse ordering of the sentence made
this difficult to parse. After reversing the order and removing
negation, the surrounding paragraphs were updated to match the style.
  • Loading branch information
blottn committed May 11, 2024
1 parent a4a85fa commit df756d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/json-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ To create and equivalent schema in draft-2020-12 use keywords [prefixItems](#pre

The value of the keyword should be a boolean or an object.

If `items` keyword is not present or it is an object, `additionalItems` keyword should be ignored regardless of its value. By default Ajv will throw exception in this case - see [Strict mode](./strict-mode.md)
`additionalItems` keyword is ignored if `items` keyword is not present or is an object. By default Ajv will throw exception in this case - see [Strict mode](./strict-mode.md)

If `items` keyword is an array and data array has not more items than the length of `items` keyword value, `additionalItems` keyword is also ignored.
`additionalItems` keyword is ignored if `items` keyword has more elements than data array.

If the length of data array is bigger than the length of "items" keyword value than the result of the validation depends on the value of `additionalItems` keyword:
If the data array has more elements than the `items` keyword value then the result of the validation depends on the value of `additionalItems` keyword:

- `false`: data is invalid
- `true`: data is valid
Expand Down

0 comments on commit df756d1

Please sign in to comment.