Skip to content

component §3: behaviour when a document uses a field from a newer schema release #14

Description

@justinmerrell

Left open by #13. Issue #9 supplied no answer, and neither project implements one.

specifications/component/v1/spec.md §3:

TODO — Specify the behaviour when a document uses a field introduced in a schema release newer than the validator holds. Expected shape: reject with ERR_UNKNOWN_FIELD and instruct the operator to update, rather than ignore.

Why it matters

§3 already promises two things that pull against each other: specVersion: v1 names a compatibility family rather than an exact schema, and validation MUST NOT become stricter within a major. Adding an optional field in v1.3.0 is therefore legal — and a validator holding v1.1.0 sees a document it cannot evaluate.

The TODO's expected shape (reject, tell the operator to update) is almost certainly right: §2 already rejects unknown properties everywhere precisely so a misspelling cannot silently take a default, and a field from the future is indistinguishable from a misspelling without the newer schema. But "almost certainly right" is not a specification, and the failure it prevents — a validator quietly ignoring a field the author wrote — is the one §2 exists to prevent.

What deciding it costs

Nothing. It writes down the behaviour ERR_UNKNOWN_FIELD already produces. The work is the prose plus a conformance case, not a schema change.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions