queryer merger test progress

This commit is contained in:
2026-03-11 05:18:01 -04:00
parent 1c08a8f2b8
commit 44be75f5d4
104 changed files with 22563 additions and 18859 deletions

677
fixtures/allOf.json Normal file
View File

@ -0,0 +1,677 @@
[
{
"description": "allOf",
"database": {
"schemas": [
{
"allOf": [
{
"properties": {
"bar": {
"type": "integer"
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
],
"$id": "allOf_0_0"
}
]
},
"tests": [
{
"description": "allOf",
"data": {
"foo": "baz",
"bar": 2
},
"schema_id": "allOf_0_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "mismatch second",
"data": {
"foo": "baz"
},
"schema_id": "allOf_0_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "mismatch first",
"data": {
"bar": 2
},
"schema_id": "allOf_0_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "wrong type",
"data": {
"foo": "baz",
"bar": "quux"
},
"schema_id": "allOf_0_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with base schema",
"database": {
"schemas": [
{
"properties": {
"bar": {
"type": "integer"
},
"baz": {},
"foo": {
"type": "string"
}
},
"required": [
"bar"
],
"allOf": [
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
},
{
"properties": {
"baz": {
"type": "null"
}
},
"required": [
"baz"
]
}
],
"$id": "allOf_1_0"
}
]
},
"tests": [
{
"description": "valid",
"data": {
"foo": "quux",
"bar": 2,
"baz": null
},
"schema_id": "allOf_1_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "mismatch base schema",
"data": {
"foo": "quux",
"baz": null
},
"schema_id": "allOf_1_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "mismatch first allOf",
"data": {
"bar": 2,
"baz": null
},
"schema_id": "allOf_1_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "mismatch second allOf",
"data": {
"foo": "quux",
"bar": 2
},
"schema_id": "allOf_1_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "mismatch both",
"data": {
"bar": 2
},
"schema_id": "allOf_1_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf simple types",
"database": {
"schemas": [
{
"allOf": [
{
"maximum": 30
},
{
"minimum": 20
}
],
"$id": "allOf_2_0"
}
]
},
"tests": [
{
"description": "valid",
"data": 25,
"schema_id": "allOf_2_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "mismatch one",
"data": 35,
"schema_id": "allOf_2_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with boolean schemas, all true",
"database": {
"schemas": [
{
"allOf": [
true,
true
],
"$id": "allOf_3_0"
}
]
},
"tests": [
{
"description": "any value is valid",
"data": "foo",
"schema_id": "allOf_3_0",
"action": "validate",
"expect": {
"success": true
}
}
]
},
{
"description": "allOf with boolean schemas, some false",
"database": {
"schemas": [
{
"allOf": [
true,
false
],
"$id": "allOf_4_0"
}
]
},
"tests": [
{
"description": "any value is invalid",
"data": "foo",
"schema_id": "allOf_4_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with boolean schemas, all false",
"database": {
"schemas": [
{
"allOf": [
false,
false
],
"$id": "allOf_5_0"
}
]
},
"tests": [
{
"description": "any value is invalid",
"data": "foo",
"schema_id": "allOf_5_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with one empty schema",
"database": {
"schemas": [
{
"allOf": [
{}
],
"$id": "allOf_6_0"
}
]
},
"tests": [
{
"description": "any data is valid",
"data": 1,
"schema_id": "allOf_6_0",
"action": "validate",
"expect": {
"success": true
}
}
]
},
{
"description": "allOf with two empty schemas",
"database": {
"schemas": [
{
"allOf": [
{},
{}
],
"$id": "allOf_7_0"
}
]
},
"tests": [
{
"description": "any data is valid",
"data": 1,
"schema_id": "allOf_7_0",
"action": "validate",
"expect": {
"success": true
}
}
]
},
{
"description": "allOf with the first empty schema",
"database": {
"schemas": [
{
"allOf": [
{},
{
"type": "number"
}
],
"$id": "allOf_8_0"
}
]
},
"tests": [
{
"description": "number is valid",
"data": 1,
"schema_id": "allOf_8_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "string is invalid",
"data": "foo",
"schema_id": "allOf_8_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with the last empty schema",
"database": {
"schemas": [
{
"allOf": [
{
"type": "number"
},
{}
],
"$id": "allOf_9_0"
}
]
},
"tests": [
{
"description": "number is valid",
"data": 1,
"schema_id": "allOf_9_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "string is invalid",
"data": "foo",
"schema_id": "allOf_9_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "nested allOf, to check validation semantics",
"database": {
"schemas": [
{
"allOf": [
{
"allOf": [
{
"type": "null"
}
]
}
],
"$id": "allOf_10_0"
}
]
},
"tests": [
{
"description": "null is valid",
"data": null,
"schema_id": "allOf_10_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "anything non-null is invalid",
"data": 123,
"schema_id": "allOf_10_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "extensible: true allows extra properties in allOf",
"database": {
"schemas": [
{
"allOf": [
{
"properties": {
"bar": {
"type": "integer"
}
},
"required": [
"bar"
]
},
{
"properties": {
"foo": {
"type": "string"
}
},
"required": [
"foo"
]
}
],
"extensible": true,
"$id": "allOf_12_0"
}
]
},
"tests": [
{
"description": "extra property is valid",
"data": {
"foo": "baz",
"bar": 2,
"qux": 3
},
"schema_id": "allOf_12_0",
"action": "validate",
"expect": {
"success": true
}
}
]
},
{
"description": "strict by default with allOf properties",
"database": {
"schemas": [
{
"allOf": [
{
"properties": {
"foo": {
"const": 1
}
}
},
{
"properties": {
"bar": {
"const": 2
}
}
}
],
"$id": "allOf_13_0"
}
]
},
"tests": [
{
"description": "validates merged properties",
"data": {
"foo": 1,
"bar": 2
},
"schema_id": "allOf_13_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "fails on extra property z explicitly",
"data": {
"foo": 1,
"bar": 2,
"z": 3
},
"schema_id": "allOf_13_0",
"action": "validate",
"expect": {
"success": false
}
}
]
},
{
"description": "allOf with nested extensible: true (partial looseness)",
"database": {
"schemas": [
{
"allOf": [
{
"properties": {
"foo": {
"const": 1
}
}
},
{
"extensible": true,
"properties": {
"bar": {
"const": 2
}
}
}
],
"$id": "allOf_14_0"
}
]
},
"tests": [
{
"description": "extensible subschema doesn't make root extensible if root is strict",
"data": {
"foo": 1,
"bar": 2,
"z": 3
},
"schema_id": "allOf_14_0",
"action": "validate",
"expect": {
"success": true
}
}
]
},
{
"description": "strictness: allOf composition with strict refs",
"database": {
"schemas": [
{
"allOf": [
{
"$ref": "partA"
},
{
"$ref": "partB"
}
],
"$id": "allOf_15_0"
},
{
"$id": "partA",
"properties": {
"id": {
"type": "string"
}
}
},
{
"$id": "partB",
"properties": {
"name": {
"type": "string"
}
}
}
]
},
"tests": [
{
"description": "merged instance is valid",
"data": {
"id": "1",
"name": "Me"
},
"schema_id": "allOf_15_0",
"action": "validate",
"expect": {
"success": true
}
},
{
"description": "extra property is invalid (root is strict)",
"data": {
"id": "1",
"name": "Me",
"extra": 1
},
"schema_id": "allOf_15_0",
"action": "validate",
"expect": {
"success": false
}
},
{
"description": "partA mismatch is invalid",
"data": {
"id": 1,
"name": "Me"
},
"schema_id": "allOf_15_0",
"action": "validate",
"expect": {
"success": false
}
}
]
}
]