redhat-developer / redhat-developer/vscode-yaml

`allOf` + `unevaluatedProperties` does not work

Open
#1,219 1 comment 0 reactions 1 assignee View on GitHub

@shin19991207 is already working on this.

Since Mar 2, 2026.

Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

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"

Image

Steps to Reproduce

Create 2 files, open data file.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.