Skip to content

Commit 17d93e0

Browse files
OchirkhuyagOchi
authored andcommitted
Subscription RP v2021-10-01 endpoint fix, s360 correctness (Azure#17155)
* Copied the last item from private repo and renamed to 2021-10-01 * Updated the version to 2021-10-01 * Error response is updated. It is required by OpenAPI Validation Tools(linter) * http status response on post method is updated to 201 from 202; required by OpenAPI Validation Tools(linter) * description is added in #definitions.Operation.properties.display; required by OpenAPI Validation Tools(linter) * updated error response to match it previous * systemData properties are added; required by Swagger validation on the PR * updated readme.md for the new version * removed a file getSubscriptionOperation.json as long as it is not referenced; required by Swagger Avocado on the PR * Modified style by npm prettier * executed npm run prettier; required by prettier check on PR * added type:object; required by swagger LintDiff * added type:object; required by swagger LintDiff * reverted back the post response of acceptOwnership to 202 * http status response on post method is updated to 201 from 202; required by OpenAPI Validation Tools(linter) * reverted back the post response of acceptOwnership to 202 * Updated property name value to subscriptionId * Added missing property in response body of Get List of Alias subscription API * Updated response of default policies from 201 to 200 based on API response * Updated example for response of default policies from 201 to 200 based on API response * s360 fix: error response is fixed on managementpartner * added Microsoft.Subscription/stable/2016-06-01/subscriptions.json in input file list * Lint diff errors are fixed * reverting back the changes for 2-16-06-01 * added v2016-06-01 for the new * executed prettier Co-authored-by: Ochi <[email protected]>
1 parent 689f0fc commit 17d93e0

File tree

7 files changed

+24
-16
lines changed

7 files changed

+24
-16
lines changed

specification/managementpartner/resource-manager/Microsoft.ManagementPartner/preview/2018-02-01/ManagementPartner.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,7 @@
322322
},
323323
"ErrorResponseCode": {
324324
"type": "string",
325-
"description": "this is the error response code that management partner operations may return",
326-
"enum": [
327-
"NotFound",
328-
"Conflict",
329-
"BadRequest"
330-
]
325+
"description": "this is the error response code that management partner operations may return"
331326
},
332327
"Error": {
333328
"type": "object",
@@ -336,6 +331,14 @@
336331
"error": {
337332
"$ref": "#/definitions/ExtendedErrorInfo",
338333
"description": "this is the ExtendedErrorInfo property"
334+
},
335+
"code": {
336+
"$ref": "#/definitions/ErrorResponseCode",
337+
"description": "this is the error response code"
338+
},
339+
"message": {
340+
"type": "string",
341+
"description": "this is the extended error info message"
339342
}
340343
}
341344
},

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/cancelSubscription.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"responses": {
77
"200": {
88
"body": {
9-
"value": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
9+
"subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
1010
}
1111
}
1212
}

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/changeTenantPolicy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
"responses": {
14-
"201": {
14+
"200": {
1515
"body": {
1616
"id": "providers/Microsoft.Subscription/policies/default",
1717
"name": "default",

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/enableSubscription.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"responses": {
77
"200": {
88
"body": {
9-
"value": "7948bcee-488c-47ce-941c-38e20ede803d"
9+
"subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d"
1010
}
1111
}
1212
}

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/examples/renameSubscription.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"responses": {
1010
"200": {
1111
"body": {
12-
"value": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
12+
"subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
1313
}
1414
}
1515
}

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
]
292292
}
293293
},
294-
"/providers/Microsoft.Subscription/{subscriptionId}/acceptOwnership": {
294+
"/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership": {
295295
"post": {
296296
"description": "Accept subscription ownership.",
297297
"operationId": "Subscription_AcceptOwnership",
@@ -341,7 +341,7 @@
341341
]
342342
}
343343
},
344-
"/providers/Microsoft.Subscription/{subscriptionId}/acceptOwnershipStatus": {
344+
"/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": {
345345
"get": {
346346
"description": "Accept subscription ownership status.",
347347
"operationId": "Subscription_AcceptOwnershipStatus",
@@ -384,7 +384,7 @@
384384
}
385385
},
386386
"responses": {
387-
"201": {
387+
"200": {
388388
"description": "Subscription tenant policy has been successfully created/updated.",
389389
"schema": {
390390
"$ref": "#/definitions/GetTenantPolicyResponse"
@@ -544,7 +544,7 @@
544544
"description": "The ID of the canceled subscription",
545545
"type": "object",
546546
"properties": {
547-
"value": {
547+
"subscriptionId": {
548548
"description": "The ID of the canceled subscription",
549549
"type": "string",
550550
"readOnly": true
@@ -555,7 +555,7 @@
555555
"description": "The ID of the subscriptions that is being renamed",
556556
"type": "object",
557557
"properties": {
558-
"value": {
558+
"subscriptionId": {
559559
"description": "The ID of the subscriptions that is being renamed",
560560
"type": "string",
561561
"readOnly": true
@@ -566,7 +566,7 @@
566566
"description": "The ID of the subscriptions that is being enabled",
567567
"type": "object",
568568
"properties": {
569-
"value": {
569+
"subscriptionId": {
570570
"description": "The ID of the subscriptions that is being enabled",
571571
"type": "string",
572572
"readOnly": true
@@ -781,6 +781,10 @@
781781
"description": "The Management Group Id.",
782782
"type": "string"
783783
},
784+
"createdTime": {
785+
"description": "Created Time",
786+
"type": "string"
787+
},
784788
"tags": {
785789
"description": "Tags for the subscription",
786790
"type": "object",

specification/subscription/resource-manager/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ These settings apply only when `--tag=package-2021-10` is specified on the comma
4040

4141
``` yaml $(tag) == 'package-2021-10'
4242
input-file:
43+
- Microsoft.Subscription/stable/2016-06-01/subscriptions.json
4344
- Microsoft.Subscription/stable/2021-10-01/subscriptions.json
4445
title: SubscriptionClient
4546
description: The subscription client

0 commit comments

Comments
 (0)