You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
Funny Story: I just so happened to define "readOnly" and "writeOnly" as custom keywords for our needs. Was surprised when my editor started to complain that I was using them incorrectly. I wondered how does it know how I should be using them? I based my knowledge of the spec solely on "Understanding JSON Schema" and it doesn't mention them. So I went to draft 7 and found them there. Good news: I don't need to define custom keyword. Bad news: I need to correct my documentation on how to use them correctly to match the standard. (I had been using them more like how "required" works. Just supplying an array of property names that are read only).
Anyway, I love the site. I don't think I'd have been able to get up to speed on JSON schema without this site; or by just relying on reading the spec.
@mgwelch we actually considered switching them to behave like required at one point, but there weren't many people interested in that, and they've been in Hyper-Schema (readOnly) and OpenAPI (readOnly and writeOnly) as booleans for years so it made more sense to stick with that.
It also allows for making things read/write-only that do not involve objects. IIRC another reason that we didn't go ahead was that there were odd use cases that don't come up with required that didn't work as well for these keywords if we made them use arrays.
A subissue of #79.
The text was updated successfully, but these errors were encountered: