When using the
@JsonProperty(required = true) annotation from the
json schema module I get results like "
firstName":{
"type": "string",
"required": true}, yet in the json schema spec and accompanying examples, I see it as an array in the top level object. Can anyone explain why it is embedded in the firstName object, rather than placed in a required array?
{
"title": "Example Schema",
"type": "object",
"properties": {
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"age": {
"description": "Age in years",
"type": "integer",
"minimum": 0
}
},
"required": ["firstName", "lastName"]
}