-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathgateleen_validation_schema_validation
57 lines (57 loc) · 1.54 KB
/
gateleen_validation_schema_validation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"resources": {
"description": "Array of resources to be validated",
"type": "array",
"items": {
"$ref": "#/definitions/Resource"
}
}
},
"additionalProperties": false,
"definitions": {
"Resource": {
"description": "Resource to be validated",
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"description": "The URL to validate. Regex can be used to define a pattern",
"format": "regexp",
"type": "string",
"minLength": 1
},
"method": {
"description": "The HTTP method to validate. Regex can be used to define a pattern. If not provided, PUT will be used as default",
"format": "regexp",
"type": "string"
},
"schema": {
"description": "The schema configuration to use to validate this resource",
"$ref": "#/definitions/Schema"
}
},
"required": ["url"]
},
"Schema": {
"properties": {
"location": {
"description": "The path to the schema location",
"type": "string",
"minLength": 1
},
"keepInMemory": {
"description": "The number of seconds to keep the parsed JsonSchema in memory to reduce the load of creating a new schema for every call. If not provided, the JsonSchema will not be cached",
"type": "integer",
"minimum": 1,
"maximum": 86400
}
},
"required": [
"location"
],
"additionalProperties": false
}
}
}