|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "version": "2022-11-11-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 | + "readOnly": true |
| 152 | + }, |
| 153 | + "description": { |
| 154 | + "type": "string", |
| 155 | + "description": "Description of the project.", |
| 156 | + "readOnly": true |
| 157 | + } |
| 158 | + } |
| 159 | + }, |
| 160 | + "CloudError": { |
| 161 | + "x-ms-external": true, |
| 162 | + "type": "object", |
| 163 | + "required": [ |
| 164 | + "error" |
| 165 | + ], |
| 166 | + "properties": { |
| 167 | + "error": { |
| 168 | + "description": "Error body", |
| 169 | + "$ref": "#/definitions/CloudErrorBody" |
| 170 | + } |
| 171 | + }, |
| 172 | + "description": "An error response from the service." |
| 173 | + }, |
| 174 | + "CloudErrorBody": { |
| 175 | + "x-ms-external": true, |
| 176 | + "description": "An error response from the service.", |
| 177 | + "type": "object", |
| 178 | + "required": [ |
| 179 | + "code", |
| 180 | + "message" |
| 181 | + ], |
| 182 | + "properties": { |
| 183 | + "code": { |
| 184 | + "type": "string", |
| 185 | + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." |
| 186 | + }, |
| 187 | + "message": { |
| 188 | + "type": "string", |
| 189 | + "description": "A message describing the error, intended to be suitable for display in a user interface." |
| 190 | + }, |
| 191 | + "target": { |
| 192 | + "type": "string", |
| 193 | + "description": "The target of the particular error. For example, the name of the property in error." |
| 194 | + }, |
| 195 | + "details": { |
| 196 | + "type": "array", |
| 197 | + "items": { |
| 198 | + "$ref": "#/definitions/CloudErrorBody" |
| 199 | + }, |
| 200 | + "description": "A list of additional details about the error." |
| 201 | + } |
| 202 | + } |
| 203 | + }, |
| 204 | + "ProvisioningError": { |
| 205 | + "description": "Error details", |
| 206 | + "type": "object", |
| 207 | + "properties": { |
| 208 | + "code": { |
| 209 | + "type": "string", |
| 210 | + "description": "The error code." |
| 211 | + }, |
| 212 | + "message": { |
| 213 | + "type": "string", |
| 214 | + "description": "The error message." |
| 215 | + } |
| 216 | + } |
| 217 | + }, |
| 218 | + "EnableStatus": { |
| 219 | + "description": "Enable or disable status. Indicates whether the property applied to is either enabled or disabled.", |
| 220 | + "enum": [ |
| 221 | + "Enabled", |
| 222 | + "Disabled" |
| 223 | + ], |
| 224 | + "type": "string", |
| 225 | + "x-ms-enum": { |
| 226 | + "name": "EnableStatus", |
| 227 | + "modelAsString": true |
| 228 | + } |
| 229 | + } |
| 230 | + }, |
| 231 | + "parameters": { |
| 232 | + "ProjectNameParameter": { |
| 233 | + "name": "projectName", |
| 234 | + "description": "The DevCenter Project upon which to execute operations.", |
| 235 | + "required": true, |
| 236 | + "type": "string", |
| 237 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$", |
| 238 | + "minLength": 3, |
| 239 | + "maxLength": 63, |
| 240 | + "in": "path", |
| 241 | + "x-ms-parameter-location": "client" |
| 242 | + }, |
| 243 | + "ProjectNameMethodParameter": { |
| 244 | + "name": "projectName", |
| 245 | + "description": "The DevCenter Project upon which to execute operations.", |
| 246 | + "required": true, |
| 247 | + "type": "string", |
| 248 | + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$", |
| 249 | + "minLength": 3, |
| 250 | + "maxLength": 63, |
| 251 | + "in": "path", |
| 252 | + "x-ms-parameter-location": "method" |
| 253 | + }, |
| 254 | + "ApiVersionParameter": { |
| 255 | + "name": "api-version", |
| 256 | + "in": "query", |
| 257 | + "required": true, |
| 258 | + "type": "string", |
| 259 | + "description": "The API version to be used with the HTTP request.", |
| 260 | + "x-ms-parameter-location": "client" |
| 261 | + }, |
| 262 | + "FilterParameter": { |
| 263 | + "name": "filter", |
| 264 | + "in": "query", |
| 265 | + "description": "An OData filter clause to apply to the operation.", |
| 266 | + "type": "string", |
| 267 | + "required": false, |
| 268 | + "x-ms-parameter-location": "method" |
| 269 | + }, |
| 270 | + "TopParameter": { |
| 271 | + "name": "top", |
| 272 | + "in": "query", |
| 273 | + "description": "The maximum number of resources to return from the operation. Example: 'top=10'.", |
| 274 | + "type": "integer", |
| 275 | + "format": "int32", |
| 276 | + "required": false, |
| 277 | + "x-ms-parameter-location": "method" |
| 278 | + }, |
| 279 | + "UserIdParameter": { |
| 280 | + "name": "userId", |
| 281 | + "in": "path", |
| 282 | + "required": true, |
| 283 | + "x-ms-client-default": "me", |
| 284 | + "type": "string", |
| 285 | + "pattern": "^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$", |
| 286 | + "minLength": 2, |
| 287 | + "maxLength": 36, |
| 288 | + "description": "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", |
| 289 | + "x-ms-parameter-location": "method" |
| 290 | + }, |
| 291 | + "EndpointParameter": { |
| 292 | + "name": "endpoint", |
| 293 | + "description": "The DevCenter-specific URI to operate on.", |
| 294 | + "required": true, |
| 295 | + "type": "string", |
| 296 | + "in": "path", |
| 297 | + "x-ms-skip-url-encoding": true, |
| 298 | + "x-ms-parameter-location": "client" |
| 299 | + } |
| 300 | + } |
| 301 | +} |
0 commit comments