Skip to content

Commit 64c508d

Browse files
chrissmillermikekistler
authored andcommitted
[Hub Generated] Publish private branch 'chrissmiller-devcenter-Microsoft.DevCenter-2023-01-01-preview' (Azure#22511)
* Adds base for updating Microsoft.DevCenter from version preview/2022-11-11-preview to version 2023-01-01-preview * Updates readme * Updates API version in new specs and examples * 2023-01-01-preview changes * Environments changes * Add devbox action updates * Fix pipeline errors * Update location header * Add restart action * Minor fixes, control plane alignment, standardization on use-specific enums for future proofing * Add updates to delay multiple API * Final model changes for collection delay * Apply suggestions from code review Co-authored-by: Mike Kistler <[email protected]> * Update errorDetails -> error, remove ProvisioningError to unify on CloudErrorBody, update pkg tag and suppression * readonly updates, delay multiple schema * Rename catalogItem -> environmentDefinition * Update specification/devcenter/data-plane/Microsoft.DevCenter/preview/2023-01-01-preview/environments.json Co-authored-by: Mike Kistler <[email protected]> * Fix examples * Add operation status body response * Add enum documentation, run prettier * Resolve warning about lro options by specifying final-state-via on POSTs --------- Co-authored-by: Mike Kistler <[email protected]>
1 parent c503f71 commit 64c508d

36 files changed

+4192
-2
lines changed

specification/devcenter/data-plane/Microsoft.DevCenter/preview/2023-01-01-preview/devbox.json

Lines changed: 1825 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2023-01-01-preview",
5+
"title": "DevCenter"
6+
},
7+
"x-ms-parameterized-host": {
8+
"hostTemplate": "{endpoint}",
9+
"useSchemePrefix": false,
10+
"parameters": [
11+
{
12+
"$ref": "devcenter.json#/parameters/EndpointParameter"
13+
}
14+
]
15+
},
16+
"schemes": [
17+
"https"
18+
],
19+
"consumes": [
20+
"application/json"
21+
],
22+
"produces": [
23+
"application/json"
24+
],
25+
"security": [
26+
{
27+
"AADToken": [
28+
"user_impersonation"
29+
]
30+
}
31+
],
32+
"securityDefinitions": {
33+
"AADToken": {
34+
"type": "oauth2",
35+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
36+
"flow": "implicit",
37+
"description": "Azure Active Directory OAuth2 Flow",
38+
"scopes": {
39+
"user_impersonation": "impersonate your user account"
40+
}
41+
}
42+
},
43+
"paths": {
44+
"/projects": {
45+
"get": {
46+
"tags": [
47+
"Projects"
48+
],
49+
"description": "Lists all projects.",
50+
"parameters": [
51+
{
52+
"$ref": "#/parameters/ApiVersionParameter"
53+
},
54+
{
55+
"$ref": "#/parameters/FilterParameter"
56+
},
57+
{
58+
"$ref": "#/parameters/TopParameter"
59+
}
60+
],
61+
"operationId": "DevCenter_ListProjects",
62+
"responses": {
63+
"200": {
64+
"description": "OK. The request has succeeded.",
65+
"schema": {
66+
"$ref": "#/definitions/ProjectListResult"
67+
}
68+
},
69+
"default": {
70+
"description": "Error response describing why the operation failed.",
71+
"schema": {
72+
"$ref": "#/definitions/CloudError"
73+
}
74+
}
75+
},
76+
"x-ms-examples": {
77+
"DevCenter_ListProjects": {
78+
"$ref": "./examples/Projects_ListByDevCenter.json"
79+
}
80+
},
81+
"x-ms-pageable": {
82+
"nextLinkName": "nextLink"
83+
}
84+
}
85+
},
86+
"/projects/{projectName}": {
87+
"get": {
88+
"tags": [
89+
"Projects"
90+
],
91+
"description": "Gets a project.",
92+
"parameters": [
93+
{
94+
"$ref": "#/parameters/ProjectNameMethodParameter"
95+
},
96+
{
97+
"$ref": "#/parameters/ApiVersionParameter"
98+
}
99+
],
100+
"operationId": "DevCenter_GetProject",
101+
"responses": {
102+
"200": {
103+
"description": "OK. The request has succeeded.",
104+
"schema": {
105+
"$ref": "#/definitions/Project"
106+
}
107+
},
108+
"default": {
109+
"description": "Error response describing why the operation failed.",
110+
"schema": {
111+
"$ref": "#/definitions/CloudError"
112+
}
113+
}
114+
},
115+
"x-ms-examples": {
116+
"DevCenter_GetProject": {
117+
"$ref": "./examples/Projects_Get.json"
118+
}
119+
}
120+
}
121+
}
122+
},
123+
"definitions": {
124+
"ProjectListResult": {
125+
"description": "Results of the project list operation.",
126+
"type": "object",
127+
"properties": {
128+
"value": {
129+
"description": "Current page of results.",
130+
"type": "array",
131+
"items": {
132+
"$ref": "#/definitions/Project"
133+
}
134+
},
135+
"nextLink": {
136+
"description": "URL to get the next set of results if there are any.",
137+
"type": "string"
138+
}
139+
},
140+
"required": [
141+
"value"
142+
]
143+
},
144+
"Project": {
145+
"description": "Project details.",
146+
"type": "object",
147+
"properties": {
148+
"name": {
149+
"type": "string",
150+
"description": "Name of the project"
151+
},
152+
"description": {
153+
"type": "string",
154+
"description": "Description of the project."
155+
},
156+
"maxDevBoxesPerUser": {
157+
"type": "integer",
158+
"format": "int32",
159+
"minimum": 0,
160+
"description": "When specified, indicates the maximum number of Dev Boxes a single user can create across all pools in the project."
161+
}
162+
},
163+
"required": [
164+
"name"
165+
]
166+
},
167+
"CloudError": {
168+
"x-ms-external": true,
169+
"type": "object",
170+
"required": [
171+
"error"
172+
],
173+
"properties": {
174+
"error": {
175+
"description": "Error body",
176+
"$ref": "#/definitions/CloudErrorBody"
177+
}
178+
},
179+
"description": "An error response from the service."
180+
},
181+
"CloudErrorBody": {
182+
"x-ms-external": true,
183+
"description": "An error response from the service.",
184+
"type": "object",
185+
"required": [
186+
"code",
187+
"message"
188+
],
189+
"properties": {
190+
"code": {
191+
"type": "string",
192+
"description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically."
193+
},
194+
"message": {
195+
"type": "string",
196+
"description": "A message describing the error, intended to be suitable for display in a user interface."
197+
},
198+
"target": {
199+
"type": "string",
200+
"description": "The target of the particular error. For example, the name of the property in error."
201+
},
202+
"details": {
203+
"type": "array",
204+
"items": {
205+
"$ref": "#/definitions/CloudErrorBody"
206+
},
207+
"description": "A list of additional details about the error."
208+
}
209+
}
210+
},
211+
"OperationStatus": {
212+
"description": "The current status of an async operation",
213+
"type": "object",
214+
"properties": {
215+
"id": {
216+
"description": "Fully qualified ID for the operation status.",
217+
"type": "string"
218+
},
219+
"name": {
220+
"description": "The operation id name",
221+
"type": "string"
222+
},
223+
"status": {
224+
"description": "Provisioning state of the resource.",
225+
"type": "string"
226+
},
227+
"resourceId": {
228+
"description": "The id of the resource.",
229+
"type": "string"
230+
},
231+
"startTime": {
232+
"description": "The start time of the operation",
233+
"type": "string",
234+
"format": "date-time"
235+
},
236+
"endTime": {
237+
"description": "The end time of the operation",
238+
"type": "string",
239+
"format": "date-time"
240+
},
241+
"percentComplete": {
242+
"description": "Percent of the operation that is complete",
243+
"type": "number",
244+
"minimum": 0,
245+
"maximum": 100
246+
},
247+
"properties": {
248+
"description": "Custom operation properties, populated only for a successful operation.",
249+
"type": "object"
250+
},
251+
"error": {
252+
"description": "Operation Error message",
253+
"type": "object",
254+
"properties": {
255+
"code": {
256+
"type": "string",
257+
"description": "The error code."
258+
},
259+
"message": {
260+
"type": "string",
261+
"description": "The error message."
262+
}
263+
}
264+
}
265+
},
266+
"required": [
267+
"status"
268+
]
269+
}
270+
},
271+
"parameters": {
272+
"ProjectNameParameter": {
273+
"name": "projectName",
274+
"description": "The DevCenter Project upon which to execute operations.",
275+
"required": true,
276+
"type": "string",
277+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$",
278+
"minLength": 3,
279+
"maxLength": 63,
280+
"in": "path",
281+
"x-ms-parameter-location": "client"
282+
},
283+
"ProjectNameMethodParameter": {
284+
"name": "projectName",
285+
"description": "The DevCenter Project upon which to execute operations.",
286+
"required": true,
287+
"type": "string",
288+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$",
289+
"minLength": 3,
290+
"maxLength": 63,
291+
"in": "path",
292+
"x-ms-parameter-location": "method"
293+
},
294+
"ApiVersionParameter": {
295+
"name": "api-version",
296+
"in": "query",
297+
"required": true,
298+
"type": "string",
299+
"description": "The API version to be used with the HTTP request.",
300+
"x-ms-parameter-location": "client"
301+
},
302+
"FilterParameter": {
303+
"name": "filter",
304+
"in": "query",
305+
"description": "An OData filter clause to apply to the operation.",
306+
"type": "string",
307+
"required": false,
308+
"x-ms-parameter-location": "method"
309+
},
310+
"TopParameter": {
311+
"name": "top",
312+
"in": "query",
313+
"description": "The maximum number of resources to return from the operation. Example: 'top=10'.",
314+
"type": "integer",
315+
"format": "int32",
316+
"required": false,
317+
"x-ms-parameter-location": "method"
318+
},
319+
"UserIdParameter": {
320+
"name": "userId",
321+
"in": "path",
322+
"required": true,
323+
"x-ms-client-default": "me",
324+
"type": "string",
325+
"pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$",
326+
"minLength": 2,
327+
"maxLength": 36,
328+
"description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.",
329+
"x-ms-parameter-location": "method"
330+
},
331+
"EndpointParameter": {
332+
"name": "endpoint",
333+
"description": "The DevCenter-specific URI to operate on.",
334+
"required": true,
335+
"type": "string",
336+
"in": "path",
337+
"x-ms-skip-url-encoding": true,
338+
"x-ms-parameter-location": "client"
339+
}
340+
}
341+
}

0 commit comments

Comments
 (0)