-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttp-request.schema.json
41 lines (41 loc) · 1.14 KB
/
http-request.schema.json
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
{
"$id": "https://oneteme.github.io/http-request.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "HttpResquet",
"type": "object",
"properties": {
"uri": {
"type": "string",
"description": "http relative URI [required]",
"pattern": "^(?!.*//).*$"
},
"method": {
"type": "string",
"description": "http request method [optional : 'GET' by default]",
"enum": ["GET","POST","PUT","PATCH","DELETE","UPDATE"]
},
"headers": {
"type": "object",
"description": "http request headers [optional : null by default]",
"patternProperties": {
".*": { "type": "string" }
}
},
"body": {
"description": "http request body [optional : null by default]",
"type": ["number","string","boolean","object","array", "null"]
},
"acceptableStatus": {
"type": "array",
"description": "acceptable response status code [optional : 200 by default]",
"uniqueItems": true,
"minItems": 1,
"items":{
"type": "integer",
"minimum": 100,
"maximum": 527
}
}
},
"required": [ "uri" ]
}