Skip to content

Type Readonly purpose #465

Closed Answered by sinclairzx81
enzolupia asked this question in Q&A
Discussion options

You must be logged in to vote

@enzolupia Hi! :)

Just a little note, readOnly property is actually part of the draft 7 of the JSON schema 2020-12 specification.
It would be a great improvement to add support for readOnly and writeOnly properties in the future.

Ah, I actually meant to say "Isn't part of the JSON Schema Draft 6 specification" (noting TypeBox is based on draft 6 + partial 2019-09 support for intersect unevaluatedProperties), but yeah, you're quite right; the readOnly and writeOnly annotations are defined on draft 2012-12 as metadata (not necessarily related to validation though)

I have briefly looked these before, and it's difficult to know how best introduce them proper, particularly writeOnly as there…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by enzolupia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants