jspg progress

This commit is contained in:
2026-02-17 17:41:54 -05:00
parent 6e06b6fdc2
commit 32ed463df8
188 changed files with 36654 additions and 15058 deletions

152
tests/fixtures/old/propertyNames.json vendored Normal file
View File

@ -0,0 +1,152 @@
[
{
"description": "propertyNames validation",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": {
"maxLength": 3
}
},
"tests": [
{
"description": "all property names valid",
"data": {},
"valid": true
},
{
"description": "some property names invalid",
"data": {},
"valid": false
},
{
"description": "object without properties is valid",
"data": {},
"valid": true
}
]
},
{
"description": "propertyNames validation with pattern",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": {
"pattern": "^a+$"
}
},
"tests": [
{
"description": "matching property names valid",
"data": {},
"valid": true
},
{
"description": "non-matching property name is invalid",
"data": {},
"valid": false
},
{
"description": "object without properties is valid",
"data": {},
"valid": true
}
]
},
{
"description": "propertyNames with boolean schema true",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": true
},
"tests": [
{
"description": "object with any properties is valid",
"data": {},
"valid": true
},
{
"description": "empty object is valid",
"data": {},
"valid": true
}
]
},
{
"description": "propertyNames with boolean schema false",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": false
},
"tests": [
{
"description": "object with any properties is invalid",
"data": {},
"valid": false
},
{
"description": "empty object is valid",
"data": {},
"valid": true
}
]
},
{
"description": "propertyNames with const",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": {
"const": "foo"
}
},
"tests": [
{
"description": "object with property foo is valid",
"data": {},
"valid": true
},
{
"description": "object with any other property is invalid",
"data": {},
"valid": false
},
{
"description": "empty object is valid",
"data": {},
"valid": true
}
]
},
{
"description": "propertyNames with enum",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"propertyNames": {
"enum": [
"foo",
"bar"
]
}
},
"tests": [
{
"description": "object with property foo is valid",
"data": {},
"valid": true
},
{
"description": "object with property foo and bar is valid",
"data": {},
"valid": true
},
{
"description": "object with any other property is invalid",
"data": {},
"valid": false
},
{
"description": "empty object is valid",
"data": {},
"valid": true
}
]
}
]