Combining Schemas Using Keywords
You can use the oneOf, anyOf, and allOf keywords to combine schemas.
oneOfkeyword: ensures that the given data is valid against exactly one of the selected subschemas.anyOfkeyword: ensures that the given data is valid against one or more of the selected subschemas.allOfkeyword: ensures that the given data is valid against all the subschemas.
Using the oneOf Keyword
- Procedure
-
On the schema object in the activity/trigger input, click the ellipsis icon
.For an object with a
oneOfkeyword, the Select OneOf Schema option is displayed.
Note: Select the Select OneOf Schema option before you add the if/else conditions using the Add Condition option. If you add the if/else conditions first, then the Select OneOf Schema option is not displayed in the menu. -
Click Select OneOf Schema.
The schema selector dialog displays all available schemas with aoneOfarray.
-
Select one schema from the schema selector dialog.
Using the anyOf Keyword
- Procedure
-
On the schema object in the activity/trigger input, click the ellipsis icon
.For an object with the
anyOfkeyword, the Select AnyOf Schema option is displayed.
Note: Select the Select AnyOf Schema option before you add the if/else conditions using the Add Condition option. If you add the if/else conditions first, then the Select AnyOf Schema option is not displayed in the menu. -
Click Select AnyOf Schema.
The schema selector dialog displays all available schemas with the
anyOfarray.
-
Select one or more schemas from the schema selector dialog.