Skip to content

Commit 692e185

Browse files
Onboard Storage to v2 Autorest
1 parent cab2542 commit 692e185

34 files changed

+17525
-20566
lines changed

generator/autogenlist.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,8 @@ const autoGenList: AutoGenConfig[] = [
875875
{
876876
basePath: 'storage/resource-manager',
877877
namespace: 'Microsoft.Storage',
878-
postProcessor: storageProcessor
878+
postProcessor: storageProcessor,
879+
useAutorestV2: true,
879880
},
880881
{
881882
basePath: 'compute/resource-manager',
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
{
22
"id": "https://schema.management.azure.com/schemas/2015-05-01-preview/Microsoft.Storage.json#",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
43
"title": "Microsoft.Storage",
54
"description": "Microsoft Storage Resource Types",
5+
"$schema": "http://json-schema.org/draft-04/schema#",
66
"resourceDefinitions": {
77
"storageAccounts": {
8-
"type": "object",
8+
"description": "Microsoft.Storage/storageAccounts",
99
"properties": {
1010
"apiVersion": {
11-
"type": "string",
1211
"enum": [
1312
"2015-05-01-preview"
14-
]
13+
],
14+
"type": "string"
1515
},
1616
"location": {
17-
"type": "string",
18-
"description": "Resource location"
17+
"description": "Resource location",
18+
"type": "string"
1919
},
2020
"name": {
21-
"type": "string",
22-
"description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. "
21+
"description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. ",
22+
"type": "string"
2323
},
2424
"properties": {
25+
"description": "",
2526
"oneOf": [
2627
{
2728
"$ref": "#/definitions/StorageAccountPropertiesCreateParameters"
@@ -32,59 +33,58 @@
3233
]
3334
},
3435
"tags": {
36+
"description": "Resource tags",
3537
"oneOf": [
3638
{
37-
"type": "object",
3839
"additionalProperties": {
3940
"type": "string"
4041
},
41-
"properties": {}
42+
"properties": {},
43+
"type": "object"
4244
},
4345
{
4446
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
4547
}
46-
],
47-
"description": "Resource tags"
48+
]
4849
},
4950
"type": {
50-
"type": "string",
5151
"enum": [
5252
"Microsoft.Storage/storageAccounts"
53-
]
53+
],
54+
"type": "string"
5455
}
5556
},
5657
"required": [
57-
"apiVersion",
58-
"location",
5958
"name",
59+
"apiVersion",
6060
"type"
6161
],
62-
"description": "Microsoft.Storage/storageAccounts"
62+
"type": "object"
6363
}
6464
},
6565
"definitions": {
6666
"StorageAccountPropertiesCreateParameters": {
67-
"type": "object",
6867
"properties": {
6968
"accountType": {
69+
"description": "Gets or sets the account type.",
7070
"oneOf": [
7171
{
72-
"type": "string",
7372
"enum": [
7473
"Standard_LRS",
7574
"Standard_ZRS",
7675
"Standard_GRS",
7776
"Standard_RAGRS",
7877
"Premium_LRS"
79-
]
78+
],
79+
"type": "string"
8080
},
8181
{
8282
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
8383
}
84-
],
85-
"description": "Gets or sets the account type."
84+
]
8685
}
87-
}
86+
},
87+
"type": "object"
8888
}
8989
}
9090
}
Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,96 @@
11
{
22
"id": "https://schema.management.azure.com/schemas/2015-06-15/Microsoft.Storage.json#",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
43
"title": "Microsoft.Storage",
54
"description": "Microsoft Storage Resource Types",
5+
"$schema": "http://json-schema.org/draft-04/schema#",
66
"resourceDefinitions": {
77
"storageAccounts": {
8-
"type": "object",
8+
"description": "Microsoft.Storage/storageAccounts",
99
"properties": {
1010
"apiVersion": {
11-
"type": "string",
1211
"enum": [
1312
"2015-06-15"
14-
]
13+
],
14+
"type": "string"
1515
},
1616
"location": {
17-
"type": "string",
18-
"description": "The location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed."
17+
"description": "The location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.",
18+
"type": "string"
1919
},
2020
"name": {
21-
"type": "string",
22-
"minLength": 3,
21+
"description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.",
2322
"maxLength": 24,
24-
"description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only."
23+
"minLength": 3,
24+
"type": "string"
2525
},
2626
"properties": {
27+
"description": "The parameters used to create the storage account.",
2728
"oneOf": [
2829
{
2930
"$ref": "#/definitions/StorageAccountPropertiesCreateParameters"
3031
},
3132
{
3233
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
3334
}
34-
],
35-
"description": "The parameters used to create the storage account."
35+
]
3636
},
3737
"tags": {
38+
"description": "A list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.",
3839
"oneOf": [
3940
{
40-
"type": "object",
4141
"additionalProperties": {
4242
"type": "string"
4343
},
44-
"properties": {}
44+
"properties": {},
45+
"type": "object"
4546
},
4647
{
4748
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
4849
}
49-
],
50-
"description": "A list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters."
50+
]
5151
},
5252
"type": {
53-
"type": "string",
5453
"enum": [
5554
"Microsoft.Storage/storageAccounts"
56-
]
55+
],
56+
"type": "string"
5757
}
5858
},
5959
"required": [
60-
"apiVersion",
61-
"location",
6260
"name",
61+
"apiVersion",
6362
"type"
6463
],
65-
"description": "Microsoft.Storage/storageAccounts"
64+
"type": "object"
6665
}
6766
},
6867
"definitions": {
6968
"StorageAccountPropertiesCreateParameters": {
70-
"type": "object",
69+
"description": "The parameters used to create the storage account.",
7170
"properties": {
7271
"accountType": {
72+
"description": "The sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType.",
7373
"oneOf": [
7474
{
75-
"type": "string",
7675
"enum": [
7776
"Standard_LRS",
7877
"Standard_ZRS",
7978
"Standard_GRS",
8079
"Standard_RAGRS",
8180
"Premium_LRS"
82-
]
81+
],
82+
"type": "string"
8383
},
8484
{
8585
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
8686
}
87-
],
88-
"description": "The sku name. Required for account creation; optional for update. Note that in older versions, sku name was called accountType."
87+
]
8988
}
9089
},
9190
"required": [
9291
"accountType"
9392
],
94-
"description": "The parameters used to create the storage account."
93+
"type": "object"
9594
}
9695
}
9796
}

0 commit comments

Comments
 (0)