See this StackOverflow question lamenting the repetitiveness of the required key in schemas like:
"type": "object",
"properties": {
"foo": { "type": "string" },
"bar": { "type": "string" },
"baz": { "type": "string" },
},
"required": ["foo", "bar", "baz"]
This gets pretty ugly and error-prone with larger schemas. The suggested minProperties fix is problematic when the object might have additional properties on it.
Would it be possible to support a shorthand syntax like required: true? (Or maybe optional: [])?
See this StackOverflow question lamenting the repetitiveness of the
requiredkey in schemas like:This gets pretty ugly and error-prone with larger schemas. The suggested
minPropertiesfix is problematic when the object might have additional properties on it.Would it be possible to support a shorthand syntax like
required: true? (Or maybeoptional: [])?