mbknor-jackson-jsonSchema
mbknor-jackson-jsonSchema copied to clipboard
Unclear how to use annotations to set "readOnly"
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)})