Skip to content

Commit 6d41ab7

Browse files
Adds plugin config schemas. Closes #983 (#991)
1 parent 2b8c92f commit 6d41ab7

28 files changed

+1172
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy ApiCenterMinimalPermissionsPlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"resourceGroupName": {
10+
"type": "string"
11+
},
12+
"serviceName": {
13+
"type": "string"
14+
},
15+
"subscriptionId": {
16+
"type": "string"
17+
},
18+
"workspace": {
19+
"type": "string"
20+
}
21+
},
22+
"required": [
23+
"resourceGroupName",
24+
"serviceName",
25+
"subscriptionId"
26+
],
27+
"additionalProperties": false
28+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy ApiCenterOnboardingPlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"createApicEntryForNewApis": {
10+
"type": "boolean"
11+
},
12+
"resourceGroupName": {
13+
"type": "string"
14+
},
15+
"serviceName": {
16+
"type": "string"
17+
},
18+
"subscriptionId": {
19+
"type": "string"
20+
},
21+
"workspace": {
22+
"type": "string"
23+
}
24+
},
25+
"required": [
26+
"resourceGroupName",
27+
"serviceName",
28+
"subscriptionId"
29+
],
30+
"additionalProperties": false
31+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy ApiCenterProductionVersionPlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"resourceGroupName": {
10+
"type": "string"
11+
},
12+
"serviceName": {
13+
"type": "string"
14+
},
15+
"subscriptionId": {
16+
"type": "string"
17+
},
18+
"workspace": {
19+
"type": "string"
20+
}
21+
},
22+
"required": [
23+
"resourceGroupName",
24+
"serviceName",
25+
"subscriptionId"
26+
],
27+
"additionalProperties": false
28+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy AuthPlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"apiKey": {
10+
"type": "object",
11+
"properties": {
12+
"allowedKeys": {
13+
"type": "array",
14+
"items": {
15+
"type": "string"
16+
}
17+
},
18+
"parameters": {
19+
"type": "array",
20+
"items": {
21+
"type": "object",
22+
"properties": {
23+
"in": {
24+
"type": "string",
25+
"enum": [
26+
"header",
27+
"query",
28+
"cookie"
29+
]
30+
},
31+
"name": {
32+
"type": "string"
33+
}
34+
},
35+
"required": [
36+
"in",
37+
"name"
38+
]
39+
}
40+
}
41+
},
42+
"required": [
43+
"allowedKeys",
44+
"parameters"
45+
]
46+
},
47+
"oauth2": {
48+
"type": "object",
49+
"properties": {
50+
"metadataUrl": {
51+
"type": "string"
52+
},
53+
"allowedApplications": {
54+
"type": "array",
55+
"items": {
56+
"type": "string"
57+
}
58+
},
59+
"allowedAudiences": {
60+
"type": "array",
61+
"items": {
62+
"type": "string"
63+
}
64+
},
65+
"allowedPrincipals": {
66+
"type": "array",
67+
"items": {
68+
"type": "string"
69+
}
70+
},
71+
"allowedTenants": {
72+
"type": "array",
73+
"items": {
74+
"type": "string"
75+
}
76+
},
77+
"issuer": {
78+
"type": "string"
79+
},
80+
"roles": {
81+
"type": "array",
82+
"items": {
83+
"type": "string"
84+
}
85+
},
86+
"scopes": {
87+
"type": "array",
88+
"items": {
89+
"type": "string"
90+
}
91+
},
92+
"validateLifetime": {
93+
"type": "boolean"
94+
},
95+
"validateSigningKey": {
96+
"type": "boolean"
97+
}
98+
},
99+
"required": [
100+
"metadataUrl"
101+
]
102+
},
103+
"type": {
104+
"type": "string",
105+
"enum": [
106+
"apiKey",
107+
"oauth2"
108+
]
109+
}
110+
},
111+
"required": [
112+
"type"
113+
],
114+
"additionalProperties": false
115+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy CachingGuidancePlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"cacheThresholdSeconds": {
10+
"type": "integer"
11+
}
12+
},
13+
"additionalProperties": false
14+
}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "CRUD API plugin API definition",
4+
"description": "API definition for use with the CRUD API Dev Proxy plugin",
5+
"type": "object",
6+
"properties": {
7+
"$schema": {
8+
"type": "string"
9+
},
10+
"baseUrl": {
11+
"type": "string"
12+
},
13+
"dataFile": {
14+
"type": "string"
15+
},
16+
"actions": {
17+
"type": "array",
18+
"items": {
19+
"type": "object",
20+
"properties": {
21+
"action": {
22+
"type": "string",
23+
"enum": [
24+
"create",
25+
"getAll",
26+
"getOne",
27+
"getMany",
28+
"merge",
29+
"update",
30+
"delete"
31+
]
32+
},
33+
"url": {
34+
"type": "string"
35+
},
36+
"query": {
37+
"type": "string"
38+
},
39+
"method": {
40+
"type": "string",
41+
"enum": [
42+
"GET",
43+
"POST",
44+
"PUT",
45+
"PATCH",
46+
"DELETE"
47+
]
48+
},
49+
"auth": {
50+
"type": "string",
51+
"enum": [
52+
"none",
53+
"entra"
54+
]
55+
},
56+
"entraAuthConfig": {
57+
"type": "object",
58+
"properties": {
59+
"audience": {
60+
"type": "string"
61+
},
62+
"issuer": {
63+
"type": "string"
64+
},
65+
"scopes": {
66+
"type": "array",
67+
"items": {
68+
"type": "string"
69+
}
70+
},
71+
"roles": {
72+
"type": "array",
73+
"items": {
74+
"type": "string"
75+
}
76+
},
77+
"validateLifetime": {
78+
"type": "boolean"
79+
},
80+
"validateSigningKey": {
81+
"type": "boolean"
82+
}
83+
}
84+
}
85+
},
86+
"required": [
87+
"action"
88+
],
89+
"additionalProperties": false
90+
}
91+
},
92+
"auth": {
93+
"type": "string",
94+
"enum": [
95+
"none",
96+
"entra"
97+
]
98+
},
99+
"entraAuthConfig": {
100+
"type": "object",
101+
"properties": {
102+
"audience": {
103+
"type": "string"
104+
},
105+
"issuer": {
106+
"type": "string"
107+
},
108+
"scopes": {
109+
"type": "array",
110+
"items": {
111+
"type": "string"
112+
}
113+
},
114+
"roles": {
115+
"type": "array",
116+
"items": {
117+
"type": "string"
118+
}
119+
},
120+
"validateLifetime": {
121+
"type": "boolean"
122+
},
123+
"validateSigningKey": {
124+
"type": "boolean"
125+
}
126+
}
127+
}
128+
},
129+
"required": [
130+
"baseUrl",
131+
"dataFile",
132+
"actions"
133+
],
134+
"additionalProperties": false
135+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Dev Proxy CrudApiPlugin config schema",
4+
"type": "object",
5+
"properties": {
6+
"$schema": {
7+
"type": "string"
8+
},
9+
"apiFile": {
10+
"type": "string"
11+
},
12+
"required": [
13+
"apiFile"
14+
]
15+
},
16+
"additionalProperties": false
17+
}

0 commit comments

Comments
 (0)