Skip to content

Commit 4fbea49

Browse files
ankhykLeiWang3
authored andcommitted
Fix examples for some RPs (Azure#16763)
* fix LRO_RESPONSE_HEADER error in "keyvault" * fix LRO_RESPONSE_HEADER error in "managementgroups" * fix XMS_EXAMPLE_NOTFOUND_ERROR error in "managementgroups" * fix RESPONSE_BODY_NOT_IN_EXAMPLE error in "relay" * fix XMS_EXAMPLE_NOTFOUND_ERROR error in "servicefabric" * fix LRO_RESPONSE_HEADER error in "storage" * update api version to 2021-06-01 * fix code style issues
1 parent 3dcfee5 commit 4fbea49

File tree

9 files changed

+107
-3
lines changed

9 files changed

+107
-3
lines changed

specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_Update.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
}
4444
},
4545
"202": {
46+
"headers": {
47+
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2021-06-01-preview"
48+
},
4649
"body": {
4750
"properties": {
4851
"tenantId": "00000000-0000-0000-0000-000000000000",

specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/examples/DeleteManagementGroup.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
},
77
"responses": {
88
"202": {
9+
"headers": {
10+
"Location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/GroupToDelete?api-version=2021-04-01"
11+
},
912
"body": {
1013
"id": "/providers/Microsoft.Management/managementGroups/GroupToDelete",
1114
"type": "Microsoft.Management/managementGroups",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-04-01"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
11+
"display": {
12+
"provider": "aaaaaaaaaaaaaaaaaaaaa",
13+
"resource": "aaaaaaaaaaaaa",
14+
"operation": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15+
"description": "aaaaaaaaaaaaaaaaaaaaaa"
16+
}
17+
}
18+
],
19+
"nextLink": "aaaaaaaaaaaaaaaaaaa"
20+
}
21+
}
22+
}
23+
}

specification/managementgroups/resource-manager/Microsoft.Management/stable/2021-04-01/management.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@
718718
},
719719
"x-ms-pageable": {
720720
"nextLinkName": "nextLink"
721+
},
722+
"x-ms-examples": {
723+
"List Operations": {
724+
"$ref": "./examples/ListOperations.json"
725+
}
721726
}
722727
}
723728
},

specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceCreate.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,25 @@
3737
}
3838
}
3939
},
40-
"201": {}
40+
"201": {
41+
"body": {
42+
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01",
43+
"name": "example-RelayNamespace-01",
44+
"type": "Microsoft.Relay/Namespaces",
45+
"location": "West US",
46+
"sku": {
47+
"name": "Standard",
48+
"tier": "Standard"
49+
},
50+
"tags": {
51+
"tag1": "value1",
52+
"tag2": "value2"
53+
},
54+
"properties": {
55+
"provisioningState": "Unknown",
56+
"metricId": "ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-01"
57+
}
58+
}
59+
}
4160
}
4261
}

specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceUpdate.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,23 @@
3232
}
3333
}
3434
},
35-
"201": {}
35+
"201": {
36+
"body": {
37+
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01",
38+
"name": "example-RelayNamespace-01",
39+
"type": "Microsoft.Relay/Namespaces",
40+
"location": "West US",
41+
"tags": {
42+
"tag3": "value3",
43+
"tag4": "value4",
44+
"tag5": "value5",
45+
"tag6": "value6"
46+
},
47+
"properties": {
48+
"provisioningState": "Succeeded",
49+
"metricId": "ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-01"
50+
}
51+
}
52+
}
3653
}
3754
}

specification/servicefabric/resource-manager/Microsoft.ServiceFabric/stable/2021-06-01/cluster.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,11 @@
574574
},
575575
"x-ms-pageable": {
576576
"nextLinkName": "nextLink"
577+
},
578+
"x-ms-examples": {
579+
"ListOperations": {
580+
"$ref": "./examples/ListOperations.json"
581+
}
577582
}
578583
}
579584
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "aaaaaaaaaaaaaaaaaaaaaaaaa",
11+
"isDataAction": true,
12+
"display": {
13+
"provider": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
14+
"resource": "aaaaaaaaaaaaaaaaaa",
15+
"operation": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
16+
"description": "aaaaaaaaaaaaaaa"
17+
},
18+
"origin": "aaaaaaaaaaaaaa",
19+
"nextLink": "aaaaaaaaaaaaaaaaaaaaa"
20+
}
21+
],
22+
"nextLink": "aaaaaa"
23+
}
24+
}
25+
}
26+
}

specification/storage/resource-manager/Microsoft.Storage/stable/2021-06-01/examples/BlobRangesRestore.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"subscriptionId": "{subscription-id}",
44
"resourceGroupName": "res9101",
55
"accountName": "sto4445",
6-
"api-version": "2020-08-01-preview",
6+
"api-version": "2021-06-01",
77
"parameters": {
88
"timeToRestore": "2019-04-20T15:30:00.0000000Z",
99
"blobRanges": [
@@ -39,6 +39,9 @@
3939
}
4040
},
4141
"202": {
42+
"headers": {
43+
"Location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445/restoreBlobRanges?api-version=2021-06-01"
44+
},
4245
"body": {
4346
"status": "InProgress",
4447
"restoreId": "{restore_id}",

0 commit comments

Comments
 (0)