Skip to content

Commit

Permalink
Update versions/3.1.1.md
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Handl <[email protected]>
  • Loading branch information
handrews and ralfhandl authored Sep 24, 2024
1 parent 1bd77b4 commit 06998b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion versions/3.1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2773,7 +2773,7 @@ Extended validation is one way that these constraints MAY be enforced.

The `readOnly` and `writeOnly` keywords are annotations, as JSON Schema is not aware of how the data it is validating is being used.
Validation of these keywords MAY be done by checking the annotation, the read or write direction, and (if relevant) the current value of the field.
[JSON Schema Validation draft 2020-12 §9.4](https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-9.4) defines the expectations of these keywords, including that resource (described as the "owning authority") MAY either ignore a `readOnly` field or treat it as an error.
[JSON Schema Validation Draft 2020-12 §9.4](https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-9.4) defines the expectations of these keywords, including that a resource (described as the "owning authority") MAY either ignore a `readOnly` field or treat it as an error.

An example of where ignoring a "written" `readOnly` field might be appropriate is a PUT request where the field is included but the value has not been changed, since the alternative of leaving out the field would result in the field's deletion per [[RFC7231]].

Expand Down

0 comments on commit 06998b8

Please sign in to comment.