json-editor
json-editor copied to clipboard
if-then-else not working in allOf
General information
- json-editor version: 2.12.0
Expected behavior
should show only test1 or test2 and test3
Actual behavior
shows all properties the whole time
Steps to reproduce the behavior
Direct link to example: https://is.gd/8FVjkb
{
"type": "object",
"properties": {
"country": {
"default": "Test2",
"type": "string",
"enum": [
"Test1",
"Test2",
"Test3"
]
}
},
"allOf": [
{
"if": {
"properties": {
"country": {
"const": "Test1"
}
}
},
"then": {
"properties": {
"test1": {
"type": "string"
}
}
}
},
{
"if": {
"properties": {
"country": {
"enum": [
"Test2",
"Test3"
]
}
}
},
"then": {
"properties": {
"test2": {
"type": "number"
},
"test3": {
"type": "string"
}
}
}
}
]
}
Yes In amazon sp-api create listing, json schema is:
The properties is initially not required and is set to required in the allOf condition.
IT'S show errors :
any news?
Sorry, we haven't found time to look into that, yet.