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 was archived by the owner on Feb 17, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: versions/raml-10/raml-10.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -1083,7 +1083,12 @@ Declaring the type of a property to be `null` represents the lack of a value in
1083
1083
1084
1084
#### Union Type
1085
1085
1086
-
A union type is used to allow instances of data to be described by any of several types. A union type is declared via a type expression that combines 2 or more types delimited by pipe (`|`) symbols; these combined types are referred to as the union type's super types. In the following example, instances of the `Device` type may be described by either the `Phone` type or the `Notebook` type:
1086
+
A union type is used to allow instances of data to be described by any of several types. A union type is declared via a type expression that combines 2 or more types delimited by pipe (`|`) symbols; these combined types are referred to as the union type's super types. Union types can also be declared using a combination of the `type` facet with value `union` and a facet `anyOf` with a value containing an array of all the union super types. In the following example, instances of the `Device` type may be described by either the `Phone` type or the `Notebook` type:
1087
+
1088
+
| Facet | Descriptions |
1089
+
|:------|:-------------|
1090
+
| anyOf | array with the super types of the union. It cannot be empty. |
1091
+
1087
1092
1088
1093
```yaml
1089
1094
#%RAML 1.0
@@ -1115,8 +1120,9 @@ The following example defines two types and a third type which is a union of tho
0 commit comments