Skip to content

Nested property/item constraints inside a oneOf branch are not deeply validated #270

Open

Description

@belfordzjeeves

Description

After oneOf support was added (#201 / PR #267), the validator dispatches on schema.type and the traverse walk skips subschemas under the oneOf keyword (so each branch is matched against the parent's data one level deep). That means constraints nested inside a oneOf branch are never deeply validated.

Reproduction

{ "oneOf": [ { "type": "object", "properties": { "a": { "type": "string" } } } ] }

validated against { "a": 42 } — the branch matches (object type) and the invalid nested property a is not flagged.

Expected

Nested property/item constraints within a matching oneOf branch should be validated, not just the branch's top-level type.

No false positives result today, but this is a genuine validation gap worth tracking.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions