Combining Schemas Using Keywords
You can use the oneOf
, anyOf
, and allOf
keywords to combine schemas.
oneOf
keyword: ensures that the given data is valid against exactly one of the selected subschemas.anyOf
keyword: ensures that the given data is valid against one or more of the selected subschemas.allOf
keyword: 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
oneOf
keyword, 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 aoneOf
array. -
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
anyOf
keyword, 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
anyOf
array. -
Select one or more schemas from the schema selector dialog.