We are developing a tool to apply differential test on json-schema libraries.
We found a subtle error happening only with the LUA's jsonschema library.
We used the following schema:
{
"type": "object",
"properties": {
"resources": {
"type": "object",
"additionalProperties": {
"type": "object",
"oneOf": [
{
"type": "object",
"properties": {
"params": {
"type": "object",
"additionalProperties": {
"oneOf": [
{ "type": "array" },
{ "type": "object" },
{ "type": "string" }
]
}
}
}
}
]
}
}
}
}
And the following document:
{
"resources": {
"myBicepWithInvalidParams": {
"params": {
"param1": []
}
}
}
}
With these, it was generated the following error message:
Invalid doc for schema aspire property "resources"
validation failed: failed to validate additional
property myBicepWithInvalidParams: value should match
only one schema, but matches none
We are developing a tool to apply differential test on json-schema libraries.
We found a subtle error happening only with the LUA's jsonschema library.
We used the following schema:
{ "type": "object", "properties": { "resources": { "type": "object", "additionalProperties": { "type": "object", "oneOf": [ { "type": "object", "properties": { "params": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "array" }, { "type": "object" }, { "type": "string" } ] } } } } ] } } } }And the following document:
{ "resources": { "myBicepWithInvalidParams": { "params": { "param1": [] } } } }With these, it was generated the following error message: