Skip to content

Commit f9759e7

Browse files
waldekmastykarzgarrytrinder
authored andcommitted
Extends schemas with descriptions. Closes #499
1 parent 07a91de commit f9759e7

32 files changed

+364
-179
lines changed

schemas/v0.27.0/apicenterminimalpermissionsplugin.schema.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44
"type": "object",
55
"properties": {
66
"$schema": {
7-
"type": "string"
7+
"type": "string",
8+
"description": "The JSON schema reference for validation."
89
},
910
"resourceGroupName": {
10-
"type": "string"
11+
"type": "string",
12+
"description": "Name of the resource group where the Azure API Center is located."
1113
},
1214
"serviceName": {
13-
"type": "string"
15+
"type": "string",
16+
"description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered."
1417
},
1518
"subscriptionId": {
16-
"type": "string"
19+
"type": "string",
20+
"description": "ID of the Azure subscription where the Azure API Center instance is located."
1721
},
1822
"workspace": {
19-
"type": "string"
23+
"type": "string",
24+
"description": "Name of the Azure API Center workspace to use. Default is 'default'.",
25+
"default": "default"
2026
}
2127
},
2228
"required": [

schemas/v0.27.0/apicenteronboardingplugin.schema.json

+12-6
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@
44
"type": "object",
55
"properties": {
66
"$schema": {
7-
"type": "string"
7+
"type": "string",
8+
"description": "The JSON schema reference for validation."
89
},
910
"createApicEntryForNewApis": {
10-
"type": "boolean"
11+
"type": "boolean",
12+
"description": "Set to true to have Dev Proxy create new API entries for APIs detected but not yet registered in API Center. When false, Dev Proxy only lists unregistered APIs. Default is true."
1113
},
1214
"resourceGroupName": {
13-
"type": "string"
15+
"type": "string",
16+
"description": "Name of the resource group where the Azure API Center is located."
1417
},
1518
"serviceName": {
16-
"type": "string"
19+
"type": "string",
20+
"description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered."
1721
},
1822
"subscriptionId": {
19-
"type": "string"
23+
"type": "string",
24+
"description": "ID of the Azure subscription where the Azure API Center instance is located."
2025
},
2126
"workspace": {
22-
"type": "string"
27+
"type": "string",
28+
"description": "Name of the Azure API Center workspace to use. Default is 'default'."
2329
}
2430
},
2531
"required": [

schemas/v0.27.0/apicenterproductionversionplugin.schema.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@
44
"type": "object",
55
"properties": {
66
"$schema": {
7-
"type": "string"
7+
"type": "string",
8+
"description": "The JSON schema reference for validation."
89
},
910
"resourceGroupName": {
10-
"type": "string"
11+
"type": "string",
12+
"description": "Name of the resource group where the Azure API Center is located."
1113
},
1214
"serviceName": {
13-
"type": "string"
15+
"type": "string",
16+
"description": "Name of the Azure API Center instance that Dev Proxy should use to check if the APIs used in the app are registered."
1417
},
1518
"subscriptionId": {
16-
"type": "string"
19+
"type": "string",
20+
"description": "ID of the Azure subscription where the Azure API Center instance is located."
1721
},
1822
"workspace": {
19-
"type": "string"
23+
"type": "string",
24+
"description": "Name of the Azure API Center workspace to use. Default is 'default'."
2025
}
2126
},
2227
"required": [

schemas/v0.27.0/authplugin.schema.json

+33-15
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
"type": "object",
55
"properties": {
66
"$schema": {
7-
"type": "string"
7+
"type": "string",
8+
"description": "The JSON schema reference for validation."
89
},
910
"apiKey": {
1011
"type": "object",
12+
"description": "Configuration for API key authentication and authorization.",
1113
"properties": {
1214
"allowedKeys": {
1315
"type": "array",
1416
"items": {
1517
"type": "string"
16-
}
18+
},
19+
"description": "List of allowed API keys."
1720
},
1821
"parameters": {
1922
"type": "array",
23+
"description": "List of parameters that contain the API key.",
2024
"items": {
2125
"type": "object",
2226
"properties": {
@@ -26,10 +30,12 @@
2630
"header",
2731
"query",
2832
"cookie"
29-
]
33+
],
34+
"description": "Where the parameter is expected to be found. Allowed values: header, query, cookie."
3035
},
3136
"name": {
32-
"type": "string"
37+
"type": "string",
38+
"description": "Name of the parameter."
3339
}
3440
},
3541
"required": [
@@ -46,54 +52,65 @@
4652
},
4753
"oauth2": {
4854
"type": "object",
55+
"description": "Configuration for OAuth2 authentication and authorization.",
4956
"properties": {
5057
"metadataUrl": {
51-
"type": "string"
58+
"type": "string",
59+
"description": "URL to the OpenID Connect metadata document."
5260
},
5361
"allowedApplications": {
5462
"type": "array",
5563
"items": {
5664
"type": "string"
57-
}
65+
},
66+
"description": "List of allowed application IDs. Leave empty to not validate the application (appid or azp claim) for which the token is issued."
5867
},
5968
"allowedAudiences": {
6069
"type": "array",
6170
"items": {
6271
"type": "string"
63-
}
72+
},
73+
"description": "List of allowed audiences. Leave empty to not validate the audience (aud claim) for which the token is issued."
6474
},
6575
"allowedPrincipals": {
6676
"type": "array",
6777
"items": {
6878
"type": "string"
69-
}
79+
},
80+
"description": "List of allowed principals. Leave empty to not validate the principal (oid claim) for which the token is issued."
7081
},
7182
"allowedTenants": {
7283
"type": "array",
7384
"items": {
7485
"type": "string"
75-
}
86+
},
87+
"description": "List of allowed tenants. Leave empty to not validate the tenant (tid claim) for which the token is issued."
7688
},
7789
"issuer": {
78-
"type": "string"
90+
"type": "string",
91+
"description": "Allowed token issuer. Leave empty to not validate the token issuer."
7992
},
8093
"roles": {
8194
"type": "array",
8295
"items": {
8396
"type": "string"
84-
}
97+
},
98+
"description": "List of allowed roles. Leave empty to not validate the roles (roles claim) on the token."
8599
},
86100
"scopes": {
87101
"type": "array",
88102
"items": {
89103
"type": "string"
90-
}
104+
},
105+
"description": "List of allowed scopes. Leave empty to not validate the scopes (scp claim) on the token."
91106
},
92107
"validateLifetime": {
93-
"type": "boolean"
108+
"type": "boolean",
109+
"description": "Set to false to disable validating the token lifetime. Default is true."
94110
},
95111
"validateSigningKey": {
96-
"type": "boolean"
112+
"type": "boolean",
113+
"description": "Set to false to disable validating the token signature. Default is true."
97114
}
98115
},
99116
"required": [
@@ -105,7 +122,8 @@
105122
"enum": [
106123
"apiKey",
107124
"oauth2"
108-
]
125+
],
126+
"description": "Type of authentication and authorization that Dev Proxy should use. Allowed values: apiKey, oauth2."
109127
}
110128
},
111129
"required": [

schemas/v0.27.0/cachingguidanceplugin.schema.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"type": "object",
55
"properties": {
66
"$schema": {
7-
"type": "string"
7+
"type": "string",
8+
"description": "The JSON schema reference for validation."
89
},
910
"cacheThresholdSeconds": {
10-
"type": "integer"
11+
"type": "integer",
12+
"description": "The number of seconds between the same request that triggers the guidance warning. Default is 5."
1113
}
1214
},
1315
"additionalProperties": false

schemas/v0.27.0/crudapiplugin.apifile.schema.json

+45-29
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@
55
"type": "object",
66
"properties": {
77
"$schema": {
8-
"type": "string"
8+
"type": "string",
9+
"description": "The JSON schema reference for validation."
910
},
1011
"baseUrl": {
11-
"type": "string"
12+
"type": "string",
13+
"description": "Base URL where Dev Proxy exposes the API. Dev Proxy prepends this base URL to the URLs defined in actions."
1214
},
1315
"dataFile": {
14-
"type": "string"
16+
"type": "string",
17+
"description": "Path to the file that contains the data for the API. The file must define a JSON array."
1518
},
1619
"actions": {
1720
"type": "array",
21+
"description": "List of actions that the API supports. Each action defines how Dev Proxy interacts with the data.",
1822
"items": {
1923
"type": "object",
2024
"properties": {
@@ -28,13 +32,16 @@
2832
"merge",
2933
"update",
3034
"delete"
31-
]
35+
],
36+
"description": "Defines the type of action. Possible values: getAll, getOne, getMany, create, merge, update, delete."
3237
},
3338
"url": {
34-
"type": "string"
39+
"type": "string",
40+
"description": "URL where Dev Proxy exposes the action. Appended to the baseUrl. Can contain parameters in curly braces."
3541
},
3642
"query": {
37-
"type": "string"
43+
"type": "string",
44+
"description": "JSONPath query (using Newtonsoft.Json) that Dev Proxy uses to find the data in the data file. Parameters can be referenced using curly braces."
3845
},
3946
"method": {
4047
"type": "string",
@@ -44,41 +51,46 @@
4451
"PUT",
4552
"PATCH",
4653
"DELETE"
47-
]
54+
],
55+
"description": "HTTP method that Dev Proxy uses to expose the action. Defaults depend on the action type."
4856
},
4957
"auth": {
5058
"type": "string",
5159
"enum": [
5260
"none",
5361
"entra"
54-
]
62+
],
63+
"description": "Determines if the action is secured. Allowed values: none, entra. Default is none."
5564
},
5665
"entraAuthConfig": {
5766
"type": "object",
67+
"description": "Configuration for Microsoft Entra authentication for this action. Overrides the root entraAuthConfig if specified.",
5868
"properties": {
5969
"audience": {
60-
"type": "string"
70+
"type": "string",
71+
"description": "Valid audience for the token. If specified, the token's audience must match."
6172
},
6273
"issuer": {
63-
"type": "string"
74+
"type": "string",
75+
"description": "Valid token issuer. If specified, the token's issuer must match."
6476
},
6577
"scopes": {
6678
"type": "array",
67-
"items": {
68-
"type": "string"
69-
}
79+
"items": { "type": "string" },
80+
"description": "Array of valid scopes. At least one must be present in the token."
7081
},
7182
"roles": {
7283
"type": "array",
73-
"items": {
74-
"type": "string"
75-
}
84+
"items": { "type": "string" },
85+
"description": "Array of valid roles. At least one must be present in the token."
7686
},
7787
"validateLifetime": {
78-
"type": "boolean"
88+
"type": "boolean",
89+
"description": "Set to true to validate that the token hasn't expired."
7990
},
8091
"validateSigningKey": {
81-
"type": "boolean"
92+
"type": "boolean",
93+
"description": "Set to true to validate the token's signature."
8294
}
8395
}
8496
}
@@ -94,34 +106,38 @@
94106
"enum": [
95107
"none",
96108
"entra"
97-
]
109+
],
110+
"description": "Determines if the API is secured. Allowed values: none, entra. Default is none."
98111
},
99112
"entraAuthConfig": {
100113
"type": "object",
114+
"description": "Configuration for Microsoft Entra authentication. Applies to all actions unless overridden at the action level.",
101115
"properties": {
102116
"audience": {
103-
"type": "string"
117+
"type": "string",
118+
"description": "Valid audience for the token. If specified, the token's audience must match."
104119
},
105120
"issuer": {
106-
"type": "string"
121+
"type": "string",
122+
"description": "Valid token issuer. If specified, the token's issuer must match."
107123
},
108124
"scopes": {
109125
"type": "array",
110-
"items": {
111-
"type": "string"
112-
}
126+
"items": { "type": "string" },
127+
"description": "Array of valid scopes. At least one must be present in the token."
113128
},
114129
"roles": {
115130
"type": "array",
116-
"items": {
117-
"type": "string"
118-
}
131+
"items": { "type": "string" },
132+
"description": "Array of valid roles. At least one must be present in the token."
119133
},
120134
"validateLifetime": {
121-
"type": "boolean"
135+
"type": "boolean",
136+
"description": "Set to true to validate that the token hasn't expired. Default is false."
122137
},
123138
"validateSigningKey": {
124-
"type": "boolean"
139+
"type": "boolean",
140+
"description": "Set to true to validate the token's signature. Default is false."
125141
}
126142
}
127143
}

0 commit comments

Comments
 (0)