Describe the bug
I'm trying to build a mixin schema with:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/test.schema.json",
"title": "Test",
"type": "object",
"allOf": [
{ "$ref": "#/$defs/FieldsA" },
{ "$ref": "#/$defs/FieldsB" }
],
"unevaluatedProperties": false,
"$defs": {
"FieldsA": {
"type": "object",
"additionalProperties": true,
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"required": ["name"]
},
"FieldsB": {
"type": "object",
"additionalProperties": true,
"properties": {
"email": { "type": "string", "format": "email" },
"phone": { "type": "string" }
},
"required": ["email"]
}
}
}
And data being
# yaml-language-server: $schema=./test.schema.yaml
name: John Doe
age: 30
email: john@example.com
phone: "+1234567890"
#foo: bar # <- uncomment to test: should be rejected by unevaluatedProperties
Testing on both release and nightly (1.22 or 1.22.2026022708)
Other packages validate it perfectly. E.g.:
uv run check-jsonschema --schemafile data/test/test.schema.yaml data/test/test.yaml
ok -- validation done
Expected Behavior
Document pass validation with (name+email) or e.g. (name + email + phone). And don't pass on foo field.
Current Behavior
Every field in my document shows an error "Property {} is not allowed"
Steps to Reproduce
Create 2 files, open data file.
Environment
Describe the bug
I'm trying to build a mixin schema with:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/test.schema.json", "title": "Test", "type": "object", "allOf": [ { "$ref": "#/$defs/FieldsA" }, { "$ref": "#/$defs/FieldsB" } ], "unevaluatedProperties": false, "$defs": { "FieldsA": { "type": "object", "additionalProperties": true, "properties": { "name": { "type": "string" }, "age": { "type": "integer" } }, "required": ["name"] }, "FieldsB": { "type": "object", "additionalProperties": true, "properties": { "email": { "type": "string", "format": "email" }, "phone": { "type": "string" } }, "required": ["email"] } } }And data being
Testing on both release and nightly (1.22 or 1.22.2026022708)
Other packages validate it perfectly. E.g.:
uv run check-jsonschema --schemafile data/test/test.schema.yaml data/test/test.yaml ok -- validation doneExpected Behavior
Document pass validation with (name+email) or e.g. (name + email + phone). And don't pass on
foofield.Current Behavior
Every field in my document shows an error "Property {} is not allowed"
Steps to Reproduce
Create 2 files, open data file.
Environment