mbknor-jackson-jsonSchema icon indicating copy to clipboard operation
mbknor-jackson-jsonSchema copied to clipboard

Unclear how to use annotations to set "readOnly"

Open chris-brace opened this issue 4 years ago • 0 comments

According to the spec there are bools for readOnly and writeOnly (https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.4) but @JsonProperty(access =...) does not seem to control this. I am aware that i could inject js as a string into the output but this strikes me as a basic feature the library should expose somehow.

Definitely possible that i've missed it in the docs, so feel free to tell me to rtfm :)

fwiw i am doing it this way for the time being @JsonSchemaInject(bools = {@JsonSchemaBool(path = "readOnly", value = true)})

chris-brace avatar Apr 29 '20 19:04 chris-brace