Closed jdesrosiers closed 2 years ago
I agree. Thank you for pointing this out. The backend is currently being rewritten and I will factor this into this requirements. Just to be sure, that instead of this
{
"$schema": "http://json-schema.org/draft-07/schema",
"items": {
"anyOf": [
{
"type": "string",
"default": "",
"examples": [
"home",
"green"
]
}
]
}
}
It's preferable to have
{
"$schema": "http://json-schema.org/draft-07/schema",
"items": {
"type": "string",
"default": "",
"examples": [
"home",
"green"
]
}
}
This has been fixed in the new version available at www.jsonschema.net
When using the default setting for "Array Validation", "AnyOf (single schema)" , schemas for arrays with only one type are generated with a superfluous singleton
anyOf
wrapper. This leads to confusion. It would be nice if theanyOf
wrapper was only generated if there is more than one type.