Skip to main content
Version: 1.2.0

Root Choice Event

An example event that has oneOf at the root level.

Please select one of the following options:

View Raw JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json",
"title": "Root Choice Event",
"description": "An example event that has oneOf at the root level.",
"type": "object",
"allOf": [
{
"$ref": "./events/components/dataLayer.json"
}
],
"required": [
"$schema"
],
"oneOf": [
{
"title": "Option A",
"$anchor": "option_a",
"description": "This is the description for Param A.",
"type": "object",
"properties": {
"event": {
"type": "string",
"const": "option_a"
},
"param_a": {
"type": "string",
"examples": [
"example_a"
]
}
}
},
{
"title": "Option B",
"$anchor": "option_b",
"type": "object",
"properties": {
"event": {
"type": "string",
"const": "option_b"
},
"param_b": {
"type": "integer",
"examples": [
123
]
}
}
}
],
"properties": {
"$schema": {
"type": "string",
"description": "Defines the structure of the event. This can be used to validate an event against the schema provided.",
"const": "https://tracking-docs-demo.buchert.digital/schemas/1.2.0/events/root-choice-event.json"
}
}
}