dynamic type variables now recursive
This commit is contained in:
@ -37,6 +37,14 @@
|
||||
},
|
||||
"filter": {
|
||||
"type": "$kind.filter"
|
||||
},
|
||||
"conditions": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"new": { "type": "$kind.filter" },
|
||||
"old": { "type": "$kind.filter" },
|
||||
"complete": { "type": "$kind.filter" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -149,7 +157,48 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Valid nested filter payload",
|
||||
"data": {
|
||||
"kind": "person",
|
||||
"conditions": {
|
||||
"new": {
|
||||
"age": 30
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema_id": "search",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Invalid nested filter payload (fails constraint)",
|
||||
"data": {
|
||||
"kind": "person",
|
||||
"conditions": {
|
||||
"new": {
|
||||
"age": "thirty"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema_id": "search",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": false,
|
||||
"errors": [
|
||||
{
|
||||
"code": "INVALID_TYPE",
|
||||
"details": {
|
||||
"path": "conditions/new/age"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user