-
Notifications
You must be signed in to change notification settings - Fork 30
/
config.schema.json
188 lines (188 loc) · 6.47 KB
/
config.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://adobe.io/schemas/aio-cli-plugin-app.json",
"type": "object",
"properties": {
"project": { "$ref": "#/definitions/project" }
},
"required": [ "project" ],
"definitions": {
"project": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"name": {
"type": "string",
"pattern": "^[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff]{1,20}$"
},
"title": {
"type": "string",
"pattern": "^(?=.*\\S)[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\\s]{1,45}$"
},
"description": {
"type": "string",
"pattern": "^$|^(?=.*\\S)[-+!'\"/\n\r#$%&*.,:;()=?\u0040-\uD800 0-9]{1,1000}$"
},
"org": { "$ref": "#/definitions/org" },
"workspace": { "$ref": "#/definitions/workspace" }
},
"required": [ "id", "name", "title", "org", "workspace" ]
},
"workspace": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"name": {
"type": "string",
"pattern": "^[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff]{1,20}$"
},
"title": {
"type": "string",
"pattern": "^$|^(?=.*\\S)[A-Za-z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff\\s]{1,45}$"
},
"description": {
"type": "string",
"pattern": "^$|^(?=.*\\S)[-+!'\"/\n\r#$%&*.,:;()=?\u0040-\uD800 0-9]{1,500}$"
},
"action_url": {
"type": "string",
"format": "uri"
},
"app_url": {
"type": "string",
"format": "uri"
},
"details": { "$ref": "#/definitions/details" }
},
"required": [ "id", "name", "action_url", "app_url", "details" ]
},
"details": {
"type": "object",
"properties": {
"credentials": {
"type": "array",
"items": { "$ref": "#/definitions/credential" },
"default": []
},
"services": {
"type": "array",
"items": { "$ref": "#/definitions/service" },
"default": []
},
"runtime": {
"type": "object",
"properties": {
"namespaces": {
"type": "array",
"items": { "$ref": "#/definitions/namespace" },
"default": []
}
},
"required": [ "namespaces" ]
}
},
"required": [ "credentials", "services", "runtime" ]
},
"org": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9]+$"
},
"name": {
"type": "string",
"pattern": "^(?=\\S).{0,255}(?<=\\S)$"
},
"ims_org_id": {
"type": "string",
"format": "email"
}
},
"required": [ "id", "name", "ims_org_id" ]
},
"credential": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": {
"type": "string",
"pattern": "^(?=\\S).{0,255}(?<=\\S)$"
},
"integration_type": {
"type": "string",
"enum": [ "oauthweb", "oauthios", "oauthandroid", "service", "apikey" ]
},
"oauth2": { "$ref": "#/definitions/oauth2" },
"jwt": { "$ref": "#/definitions/jwt" }
},
"required": [ "id", "name" ],
"oneOf": [
{ "required": ["oauth2"] },
{ "required": ["jwt"] }
]
},
"service": {
"type": "object",
"properties": {
"code": { "type": "string" },
"name": { "type": "string" }
},
"required": [ "code", "name" ]
},
"namespace": {
"type": "object",
"properties": {
"name": { "type": "string" },
"auth": { "type": "string" }
},
"required": [ "name", "auth" ]
},
"oauth2": {
"type": "object",
"properties": {
"client_id": { "type": "string" },
"client_secret": { "type": "string" },
"defaultRedirectUri": {
"type": "string",
"format": "uri"
},
"redirect_uri": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
}
},
"required": [ "client_id", "client_secret", "redirect_uri", "defaultRedirectUri" ]
},
"jwt": {
"type": "object",
"properties": {
"client_id": { "type": "string" },
"client_secret": { "type": "string" },
"technical_account_email": {
"type": "string",
"format": "email"
},
"technical_account_id": {
"type": "string",
"format": "email"
},
"meta_scopes": {
"type": "array",
"items": { "type": "string" },
"default": []
}
},
"required": [ "client_id", "client_secret", "technical_account_email", "technical_account_id", "meta_scopes" ]
}
}
}