forked from swisspost/gateleen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgateleen_delegate_schema_delegates
74 lines (74 loc) · 1.75 KB
/
gateleen_delegate_schema_delegates
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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Delegate definition",
"type": "object",
"properties": {
"methods": {
"description": "Restricts the HTTP methods concerned by this rule (`GET`, `PUT`, `POST`, `DELETE`).\nWhen absent, all methods are concerned.",
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"description": "Documents this delegate",
"type": "string"
},
"doc": {
"description": "Link or reference to feature/specification documentation",
"type": "string"
},
"pattern": {
"description": "Pattern for grouping the incomming uri",
"type": "string"
},
"requests": {
"type": "array",
"items": {"$ref": "#/definitions/Request"}
}
},
"additionalProperties": false,
"definitions": {
"Request": {
"properties": {
"uri": {
"description": "The target of the request",
"type": "string"
},
"method": {
"description": "The operation to perform",
"enum": [
"GET",
"PUT",
"POST",
"DELETE"
]
},
"payload": {
"description": "The payload to send in requests body"
},
"headers": {
"description": "Headers to send with the request",
"type": "array",
"items": {
"description": "Header value pairs",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"uri",
"method"
],
"additionalProperties": false
}
},
"required": [
"methods",
"pattern",
"requests"
]
}