Open
Description
JSON Schema
{
"categories": {
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"type": "object",
"properties": {
"categoryName": {
"type": "string"
},
"confA": {
"type": "array",
"items": {
"test": {
"type": "string"
}
}
}
},
"required": [
"categoryName",
"confA"
]
},
{
"$ref": "#/definitions/Partial<Record<\"confB\"|\"confC\"|\"confD\">>"
}
]
}
},
"Partial<Record<\"confB\"|\"confC\"|\"confD\">>": {
"type": "object",
"properties": {
"confB": {
"type": "array",
"items": {
"test": {
"type": "string"
}
}
},
"confC": {
"type": "array",
"items": {
"test": {
"type": "string"
}
}
},
"confD": {
"type": "array",
"items": {
"test": {
"type": "string"
}
}
}
}
}
}
JSON Data
{
"categories": [
{
"categoryName": "test",
"confA": [
{
"test": "data"
}
]
},
{
"confB": [
{
"test": "dataB"
}
]
}
]
}
when validated with network nt validator given errors:
$.categories[1]: required property 'confA' not found
$.categories[1]: required property 'categoryName' not found
But the json is valid one and also validated against ajv schema validator
Metadata
Metadata
Assignees
Labels
No labels