-
Notifications
You must be signed in to change notification settings - Fork 170
/
manifest-schema.json
114 lines (114 loc) · 3.12 KB
/
manifest-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
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
{
"$id": "http://apicast.io/policy-v1.1/schema#manifest",
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"schema": {
"$id": "#/definitions/schema",
"$ref": "http://json-schema.org/draft-07/schema#",
"default": {}
},
"version": {
"$id": "#/definitions/version",
"type": "string",
"title": "The Policy Version",
"description": "A semantic version of a policy.",
"examples": [
"1.3.4",
"0.1"
],
"pattern": "^((\\d+\\.)?(\\d+\\.)?(\\*|\\d+))|builtin$"
}
},
"properties": {
"name": {
"$id": "/properties/name",
"type": "string",
"title": "The Policy Name",
"description": "Name of the policy.",
"examples": [
"Basic Authentication"
],
"minLength": 1
},
"summary": {
"$id": "/properties/summary",
"type": "string",
"title": "The Policy Summary",
"description": "Short description of what the policy does",
"examples": [
"Enables CORS (Cross Origin Resource Sharing) request handling."
],
"maxLength": 75
},
"description": {
"$id": "/properties/description",
"oneOf": [
{ "type": "string",
"minLength": 1 },
{ "type": "array", "items": { "type": "string" },
"minItems": 1
}
],
"title": "The Policy Description",
"description": "Longer description of what the policy does.",
"examples": [
"Extract authentication credentials from the HTTP Authorization header and pass them to 3scale backend.",
[ "Redirect request to different upstream: ", " - based on path", "- set different Host header"]
]
},
"order": {
"$id": "/properties/order",
"type": "object",
"title": "Order restrictions of the policy",
"description": "Specifies before or after which policies the policy should be placed in the chain.",
"properties": {
"before": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
]
},
"description": "The policy should be placed before these ones in the chain."
},
"after": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
]
},
"description": "The policy should be placed after these ones in the chain."
}
}
},
"version": {
"$ref": "#/definitions/version"
},
"configuration": {
"$ref": "#/definitions/schema"
}
},
"required": ["name", "version", "configuration", "summary"]
}