Skip to content

Instantly share code, notes, and snippets.

@gurdasnijor
Created January 25, 2021 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gurdasnijor/f62aeb9d7358af4b12973b6180193d3e to your computer and use it in GitHub Desktop.
Save gurdasnijor/f62aeb9d7358af4b12973b6180193d3e to your computer and use it in GitHub Desktop.
journey-v2 #jo
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema",
"definitions": {
"statesObject": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"meta": {
"$ref": "#/definitions/transitionMetaObject"
},
"on": {
"$ref": "#/definitions/transitionsObject"
},
"after": {
"type": "array",
"items": {
"$ref": "#/definitions/delayObject"
}
}
}
}
}
},
"transitionsObject": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"cond": {
"type": "object"
},
"target": {
"type": "string"
}
},
"required": ["target"]
}
}
},
"delayObject": {
"type": "object",
"additionalProperties": false,
"properties": {
"delay": {
"type": "number"
},
"target": {
"type": "string"
},
"meta": {
"$ref": "#/definitions/transitionMetaObject"
}
},
"required": ["target"]
}
},
"stateMetaObject": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string"
},
"name": {
"type": "string"
},
"audience_ast": {
"type": "object"
},
"destinations": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": ["name"]
}
}
},
"transitionMetaObject": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"unit": {
"type": "string"
}
},
"required": ["unit"]
}
}
},
"properties": {
"id": {
"title": "ID",
"type": "string"
},
"initial": {
"type": "string"
},
"key": {
"type": "string"
},
"states": {
"$ref": "#/definitions/statesObject"
},
"version": {
"type": "string"
}
},
"required": ["id", "key", "states"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment