-
Notifications
You must be signed in to change notification settings - Fork 0
/
scs-validate.SCHEMA.yaml
116 lines (113 loc) · 3.87 KB
/
scs-validate.SCHEMA.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
type: object
description: (JSON) schema for the scs-validate.yaml file
additionalProperties: False
properties:
endpoints:
type: object
additionalProperties: false
description:
Any endpoints not listed here are validated using the default
settings (GET request, response should be a status code < 400)
default: {}
patternProperties:
^.*$:
anyOf:
- type: boolean
const: false
description: disable validation of this endpoint
- type: object
description:
Validate the response from this endpoint using
non-default settings
additionalProperties: false
properties:
request:
type: object
description: request details
default:
method: GET
anyOf:
- additionalProperties: false
required:
- method
properties:
method:
const: GET
- additionalProperties: false
required:
- method
- json
properties:
method:
const: POST
json:
type: object
description: JSON Object passed with POST request
response:
type: object
additionalProperties: false
default: {}
properties:
status:
type: integer
headers:
type: object
text:
type: string
description: The response.text should be equal to this
json:
description:
The response, parsed as JSON, should equal this
yaml:
description:
The response, parsed as YAML, should equal this
format:
type: string
enum:
- json
- yaml
description:
Instead of validating the complete response contents (
e.g. using the 'json' or 'yaml' properties), setting
this property will only check if the response can be
parsed in this format.
scs_configuration:
type: object
description:
When defined, these parts of the configuration are overriden. By default,
the logs are changed to write to stdout at ERROR level. The script itself
already applies a dummy auth.blueprint, to disable authentication, and
appends a SCSSimpleValueConstructor for the tag !scs-secret to the
extensions.constructors list, so secrets are not needed for validation.
default:
logs:
audit:
stdout:
level: ERROR
application:
stdout:
level: ERROR
properties:
logs:
default:
audit:
stdout:
level: ERROR
application:
stdout:
level: ERROR
handle_errors:
type: boolean
description:
By default, SCS errors will make the test fail, and won't return a 500
status code. Set this to 'true' in case you want errors to return a 500
status code, rather than be raised
default: false
allow_secrets:
type: boolean
description:
By default, the validation script fails if secrets are present, since this
should not be the case when it's used in CI/CD to validate the contents of
a configuration repository. Disable this to allow secrets to be
present during validation
default: false