validator refactor progress

This commit is contained in:
2026-03-03 00:13:37 -05:00
parent e14f53e7d9
commit 3898c43742
81 changed files with 6331 additions and 7934 deletions

View File

@ -1,14 +1,18 @@
[
{
"description": "patternProperties validates properties matching a regex",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*o": {
"type": "integer"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*o": {
"type": "integer"
}
},
"items": {}
}
},
"items": {}
]
},
"tests": [
{
@ -71,16 +75,20 @@
},
{
"description": "multiple simultaneous patternProperties are validated",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"a*": {
"type": "integer"
},
"aaa*": {
"maximum": 20
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"a*": {
"type": "integer"
},
"aaa*": {
"maximum": 20
}
}
}
}
]
},
"tests": [
{
@ -131,17 +139,21 @@
},
{
"description": "regexes are not anchored by default and are case sensitive",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"[0-9]{2,}": {
"type": "boolean"
},
"X_": {
"type": "string"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"[0-9]{2,}": {
"type": "boolean"
},
"X_": {
"type": "string"
}
},
"extensible": true
}
},
"extensible": true
]
},
"tests": [
{
@ -176,12 +188,16 @@
},
{
"description": "patternProperties with boolean schemas",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*": true,
"b.*": false
}
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*": true,
"b.*": false
}
}
]
},
"tests": [
{
@ -222,13 +238,17 @@
},
{
"description": "patternProperties with null valued instance properties",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"^.*bar$": {
"type": "null"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"^.*bar$": {
"type": "null"
}
}
}
}
]
},
"tests": [
{
@ -242,14 +262,18 @@
},
{
"description": "extensible: true allows extra properties NOT matching pattern",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*o": {
"type": "integer"
"database": {
"schemas": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"patternProperties": {
"f.*o": {
"type": "integer"
}
},
"extensible": true
}
},
"extensible": true
]
},
"tests": [
{