json required annotation in jackson-module-jsonSchema

38 views
Skip to first unread message

Austin Gibbons

unread,
May 22, 2014, 5:05:14 PM5/22/14
to jackso...@googlegroups.com
Hello,

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"]
}
Reply all
Reply to author
Forward
0 new messages