-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add com.snowplowanalytics.snowplow/recoveries/jsonschema/4-1-0 (close #…
- Loading branch information
Showing
1 changed file
with
205 additions
and
0 deletions.
There are no files selected for viewing
205 changes: 205 additions & 0 deletions
205
schemas/com.snowplowanalytics.snowplow/recoveries/jsonschema/4-1-0
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
{ | ||
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", | ||
"description": "Schema for an array of recovery scenarios", | ||
"self": { | ||
"vendor": "com.snowplowanalytics.snowplow", | ||
"name": "recoveries", | ||
"format": "jsonschema", | ||
"version": "4-1-0" | ||
}, | ||
"type": "object", | ||
"minProperties": 1, | ||
"patternProperties": { | ||
"^iglu:": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"pattern": "^(([a-zA-Z0-9]+)(-?))+$", | ||
"minLength": 1, | ||
"description": "A slug name for recovery flow" | ||
}, | ||
"conditions": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"op": { | ||
"type": "string", | ||
"enum": [ | ||
"Test" | ||
], | ||
"description": "Transformation operation to perform" | ||
}, | ||
"path": { | ||
"type": "string", | ||
"description": "JSON Path to object" | ||
}, | ||
"match": { | ||
"type": "string", | ||
"description": "An expression applied when replacing field’s values with new value" | ||
}, | ||
"value": { | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "object", | ||
"description": "Compare against static value", | ||
"properties": { | ||
"value": { | ||
"type": [ | ||
"array", | ||
"number", | ||
"object", | ||
"string" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"value" | ||
], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"type": "object", | ||
"description": "Compare against regular expression", | ||
"properties": { | ||
"regex": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"regex" | ||
], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"type": "object", | ||
"description": "Compare size", | ||
"properties": { | ||
"size": { | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"eq": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"eq" | ||
], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"properties": { | ||
"lt": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"lt" | ||
], | ||
"additionalProperties": false | ||
}, | ||
{ | ||
"properties": { | ||
"gt": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"gt" | ||
], | ||
"additionalProperties": false | ||
} | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
], | ||
"description": "A value to match against" | ||
}, | ||
"from": { | ||
"type": "string", | ||
"description": "Source type to cast from" | ||
}, | ||
"to": { | ||
"type": "string", | ||
"description": "Target type to cast to" | ||
} | ||
}, | ||
"required": [ | ||
"op", | ||
"path" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"description": "Conditions required to apply steps for specific Bad Row type" | ||
}, | ||
"steps": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"op": { | ||
"type": "string", | ||
"enum": [ | ||
"Add", | ||
"Cast", | ||
"Remove", | ||
"Replace" | ||
], | ||
"description": "Transformation operation to perform" | ||
}, | ||
"path": { | ||
"type": "string", | ||
"description": "JSON Path to object" | ||
}, | ||
"match": { | ||
"type": "string", | ||
"description": "An expression applied when replacing field’s values with new value" | ||
}, | ||
"value": { | ||
"type": [ | ||
"array", | ||
"boolean", | ||
"null", | ||
"number", | ||
"object", | ||
"string" | ||
], | ||
"description": "Replace static value" | ||
}, | ||
"from": { | ||
"type": "string", | ||
"description": "Source type to cast from" | ||
}, | ||
"to": { | ||
"type": "string", | ||
"description": "Target type to cast to" | ||
} | ||
}, | ||
"required": [ | ||
"op", | ||
"path" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"description": "Steps to be applied for specific Bad Row type" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"conditions", | ||
"steps" | ||
] | ||
} | ||
} | ||
} | ||
} |