|
5 | 5 | "type": "object",
|
6 | 6 | "properties": {
|
7 | 7 | "$schema": {
|
8 |
| - "type": "string" |
| 8 | + "type": "string", |
| 9 | + "description": "The JSON schema reference for validation." |
9 | 10 | },
|
10 | 11 | "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." |
12 | 14 | },
|
13 | 15 | "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." |
15 | 18 | },
|
16 | 19 | "actions": {
|
17 | 20 | "type": "array",
|
| 21 | + "description": "List of actions that the API supports. Each action defines how Dev Proxy interacts with the data.", |
18 | 22 | "items": {
|
19 | 23 | "type": "object",
|
20 | 24 | "properties": {
|
|
28 | 32 | "merge",
|
29 | 33 | "update",
|
30 | 34 | "delete"
|
31 |
| - ] |
| 35 | + ], |
| 36 | + "description": "Defines the type of action. Possible values: getAll, getOne, getMany, create, merge, update, delete." |
32 | 37 | },
|
33 | 38 | "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." |
35 | 41 | },
|
36 | 42 | "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." |
38 | 45 | },
|
39 | 46 | "method": {
|
40 | 47 | "type": "string",
|
|
44 | 51 | "PUT",
|
45 | 52 | "PATCH",
|
46 | 53 | "DELETE"
|
47 |
| - ] |
| 54 | + ], |
| 55 | + "description": "HTTP method that Dev Proxy uses to expose the action. Defaults depend on the action type." |
48 | 56 | },
|
49 | 57 | "auth": {
|
50 | 58 | "type": "string",
|
51 | 59 | "enum": [
|
52 | 60 | "none",
|
53 | 61 | "entra"
|
54 |
| - ] |
| 62 | + ], |
| 63 | + "description": "Determines if the action is secured. Allowed values: none, entra. Default is none." |
55 | 64 | },
|
56 | 65 | "entraAuthConfig": {
|
57 | 66 | "type": "object",
|
| 67 | + "description": "Configuration for Microsoft Entra authentication for this action. Overrides the root entraAuthConfig if specified.", |
58 | 68 | "properties": {
|
59 | 69 | "audience": {
|
60 |
| - "type": "string" |
| 70 | + "type": "string", |
| 71 | + "description": "Valid audience for the token. If specified, the token's audience must match." |
61 | 72 | },
|
62 | 73 | "issuer": {
|
63 |
| - "type": "string" |
| 74 | + "type": "string", |
| 75 | + "description": "Valid token issuer. If specified, the token's issuer must match." |
64 | 76 | },
|
65 | 77 | "scopes": {
|
66 | 78 | "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." |
70 | 81 | },
|
71 | 82 | "roles": {
|
72 | 83 | "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." |
76 | 86 | },
|
77 | 87 | "validateLifetime": {
|
78 |
| - "type": "boolean" |
| 88 | + "type": "boolean", |
| 89 | + "description": "Set to true to validate that the token hasn't expired." |
79 | 90 | },
|
80 | 91 | "validateSigningKey": {
|
81 |
| - "type": "boolean" |
| 92 | + "type": "boolean", |
| 93 | + "description": "Set to true to validate the token's signature." |
82 | 94 | }
|
83 | 95 | }
|
84 | 96 | }
|
|
94 | 106 | "enum": [
|
95 | 107 | "none",
|
96 | 108 | "entra"
|
97 |
| - ] |
| 109 | + ], |
| 110 | + "description": "Determines if the API is secured. Allowed values: none, entra. Default is none." |
98 | 111 | },
|
99 | 112 | "entraAuthConfig": {
|
100 | 113 | "type": "object",
|
| 114 | + "description": "Configuration for Microsoft Entra authentication. Applies to all actions unless overridden at the action level.", |
101 | 115 | "properties": {
|
102 | 116 | "audience": {
|
103 |
| - "type": "string" |
| 117 | + "type": "string", |
| 118 | + "description": "Valid audience for the token. If specified, the token's audience must match." |
104 | 119 | },
|
105 | 120 | "issuer": {
|
106 |
| - "type": "string" |
| 121 | + "type": "string", |
| 122 | + "description": "Valid token issuer. If specified, the token's issuer must match." |
107 | 123 | },
|
108 | 124 | "scopes": {
|
109 | 125 | "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." |
113 | 128 | },
|
114 | 129 | "roles": {
|
115 | 130 | "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." |
119 | 133 | },
|
120 | 134 | "validateLifetime": {
|
121 |
| - "type": "boolean" |
| 135 | + "type": "boolean", |
| 136 | + "description": "Set to true to validate that the token hasn't expired. Default is false." |
122 | 137 | },
|
123 | 138 | "validateSigningKey": {
|
124 |
| - "type": "boolean" |
| 139 | + "type": "boolean", |
| 140 | + "description": "Set to true to validate the token's signature. Default is false." |
125 | 141 | }
|
126 | 142 | }
|
127 | 143 | }
|
|
0 commit comments