Last active
May 16, 2020 10:43
-
-
Save weburnit/241f244d4b6e44066ea15c3dfb58f4a7 to your computer and use it in GitHub Desktop.
Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"additionalProperties": false, | |
"description": "Segment", | |
"properties": { | |
"condition": { | |
"additionalProperties": false, | |
"description": "must provide it at least one condition", | |
"properties": { | |
"parameterValues": { | |
"additionalProperties": false, | |
"description": "must provide in detail", | |
"properties": { | |
"operator": { | |
"additionalProperties": false, | |
"description": "Must be and/or", | |
"enum": [ | |
"and", | |
"or" | |
], | |
"title": "Parent operator", | |
"type": "string" | |
}, | |
"subConditions": { | |
"additionalProperties": false, | |
"description": "condition", | |
"items": [ | |
{ | |
"additionalProperties": true, | |
"allOf": [ | |
{ | |
"additionalProperties": false, | |
"description": "Must provide at least this", | |
"properties": { | |
"parameterValues": { | |
"additionalProperties": false, | |
"description": "provide condition", | |
"properties": { | |
"comparisonOperator": { | |
"additionalProperties": false, | |
"description": "operator", | |
"enum": [ | |
"in", | |
"notIn", | |
"all", | |
"hasSomeOf", | |
"hasNoneOf", | |
"equals", | |
"notEquals", | |
"missing", | |
"exists", | |
"greaterThan", | |
"greaterThanOrEqualTo", | |
"lessThan", | |
"lessThanOrEqualTo", | |
"endsWith", | |
"startsWith", | |
"notContains", | |
"contains", | |
"between" | |
], | |
"title": "Operator", | |
"type": "string" | |
}, | |
"propertyName": { | |
"additionalProperties": false, | |
"description": "Must provide", | |
"title": "Property name", | |
"type": "string" | |
}, | |
"propertyValue": { | |
"additionalProperties": false, | |
"description": "Compare with String value", | |
"title": "String value", | |
"type": "string" | |
}, | |
"propertyValueInteger": { | |
"additionalProperties": false, | |
"description": "Compare with Number value", | |
"title": "Number value", | |
"type": "number" | |
}, | |
"propertyValues": { | |
"additionalProperties": false, | |
"description": "Compare with Array String", | |
"items": [ | |
{ | |
"additionalProperties": false, | |
"description": "array string", | |
"title": "array string", | |
"type": "string" | |
}, | |
{ | |
"additionalProperties": false, | |
"description": "item must be string", | |
"title": "string value", | |
"type": "string" | |
} | |
], | |
"title": "String array", | |
"type": "array" | |
}, | |
"propertyValuesInteger": { | |
"additionalProperties": false, | |
"description": "Compare with Array String", | |
"items": [ | |
{ | |
"additionalProperties": false, | |
"description": "array number", | |
"title": "array numbers", | |
"type": "number" | |
}, | |
{ | |
"additionalProperties": false, | |
"description": "item must be number", | |
"title": "number value", | |
"type": "number" | |
} | |
], | |
"title": "String array", | |
"type": "array" | |
} | |
}, | |
"title": "parameters", | |
"type": "object" | |
}, | |
"type": { | |
"additionalProperties": false, | |
"description": "eventPropertyCondition", | |
"enum": [ | |
"eventPropertyCondition", | |
"profilePropertyCondition" | |
], | |
"title": "eventPropertyCondition", | |
"type": "string" | |
} | |
}, | |
"title": "eventPropertyCondition", | |
"type": "object" | |
}, | |
{ | |
"additionalProperties": false, | |
"description": "Must provide at least one scope", | |
"properties": { | |
"parameterValues": { | |
"additionalProperties": false, | |
"description": "provide condition", | |
"properties": { | |
"comparisonOperator": { | |
"additionalProperties": false, | |
"description": "operator", | |
"enum": [ | |
"in" | |
], | |
"title": "Operator", | |
"type": "string" | |
}, | |
"propertyName": { | |
"additionalProperties": false, | |
"description": "Must provide scope", | |
"enum": [ | |
"scope" | |
], | |
"title": "scope", | |
"type": "string" | |
}, | |
"propertyValues": { | |
"additionalProperties": false, | |
"description": "Must provide available scopes", | |
"items": [ | |
{ | |
"enum": ["systemscope"] | |
} | |
], | |
"title": "Available scopes", | |
"type": "array" | |
} | |
}, | |
"title": "parameters", | |
"type": "object" | |
}, | |
"type": { | |
"additionalProperties": false, | |
"description": "eventPropertyCondition", | |
"enum": [ | |
"eventPropertyCondition" | |
], | |
"title": "eventPropertyCondition", | |
"type": "string" | |
} | |
}, | |
"title": "eventPropertyCondition", | |
"type": "object" | |
} | |
], | |
"description": "event property or profile properties", | |
"title": "any of this", | |
"type": "object" | |
} | |
], | |
"title": "condition", | |
"type": "array" | |
} | |
}, | |
"required": [ | |
"operator", | |
"subConditions" | |
], | |
"title": "condition parameters", | |
"type": "object" | |
} | |
}, | |
"required": [ | |
"parameterValues" | |
], | |
"title": "condition of segment", | |
"type": "object" | |
}, | |
"description": { | |
"additionalProperties": false, | |
"description": "must provide description", | |
"title": "description", | |
"type": "string" | |
}, | |
"name": { | |
"additionalProperties": false, | |
"description": "must provide name", | |
"title": "name", | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"name", | |
"description", | |
"condition" | |
], | |
"title": "Segment Validation", | |
"type": "object" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment