Skip to content

Section 3.8 - Prohibit type annotations with type unions #5

Description

@clemensv

Add a clause that explicitly prohibits using type annotations in schemas where the type is a type-union.

This prevents ambiguous definitions where the type union includes a combination of types (e.g. ["string", "decimal"]) and the annotation would only apply to one of the types.

To achieve a type union of further constrained types, one must define them as reusable types and type-union those.

The prohibition will also extend to and be repeated in the validation spec.

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