You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
Add that a union type MAY have any of its super types facets as long as all super types participating in that union accept those facets
Examples
types:
Foo: number
Bar: integer
FooBar:
type: Foo | Bar
minimum: 1 # valid because both "Foo" (number) and "Bar" (integer) all accept "minimum"
types:
Foo: number
Bar: integer
Qux: string
FooBarQux:
type: Foo | Bar | Qux
minimum: 1 # invalid because "Qux" (string) does not accept the "minimum" facet
types:
Foo: number
Bar: integer
Qux:
type: string
facets:
minimum: number
FooBarQux:
type: Foo | Bar | Qux
minimum: 1 # valid because "Qux" (string) has a user-defined facet "minimum"
The text was updated successfully, but these errors were encountered:
The description of the union type makes no mention of how to apply facets and the restrictions thereof.
Proposed clarification
a union type MAY have any of its super types facets as long as all super types participating in that union accept those facets
Examples
The text was updated successfully, but these errors were encountered: