fix: preserve JSON Schema 2020-12 keywords (#1018)

This commit is contained in:
Dale Seo 2026-07-21 10:23:35 -04:00 • committed by GitHub
commit 9bf459962e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -556,6 +556,7 @@ impl ServerHandler for ConformanceServer {
"type": "object",
"$defs": {
"address": {
"$anchor": "address",
"type": "object",
"properties": {
"street": { "type": "string" },
@ -567,6 +568,19 @@ impl ServerHandler for ConformanceServer {
"name": { "type": "string" },
"address": { "$ref": "#/$defs/address" }
},
"allOf": [{
"anyOf": [
{ "required": ["name"] },
{ "required": ["address"] }
]
}],
"if": { "required": ["address"] },
"then": {
"properties": {
"address": { "required": ["street"] }
}
},
"else": { "required": ["name"] },
"additionalProperties": false
})),
),