diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj
index 55e2b20f4a1c..60c74ed808e7 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj
@@ -64,7 +64,7 @@
-
+
@@ -138,6 +138,30 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -198,6 +222,30 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AzureResourceSchemaAcceptanceTests.cs
similarity index 73%
rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs
rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AzureResourceSchemaAcceptanceTests.cs
index 4c7aa6c28a5d..9b88645f19ae 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AzureResourceSchemaAcceptanceTests.cs
@@ -9,7 +9,7 @@
namespace AutoRest.Generator.AzureResourceSchema.Tests
{
[Collection("AutoRest Azure Resource Schema Tests")]
- public static class AcceptanceTests
+ public static class AzureResourceSchemaAcceptanceTests
{
[Fact]
public static void Batch()
@@ -77,6 +77,18 @@ public static void Dns_2016_04_01()
RunSwaggerTest("DNS", "2016-04-01", "dns.json");
}
+ [Fact]
+ public static void Logic_2015_02_01_preview()
+ {
+ RunSwaggerTest("Logic", "2015-02-01-preview", "logic.json");
+ }
+
+ [Fact]
+ public static void MachineLearning_2016_05_01_preview()
+ {
+ RunSwaggerTest("MachineLearning", "2016-05-01-preview", "webservices.json");
+ }
+
[Fact]
public static void Network_2015_05_01_preview()
{
@@ -95,6 +107,36 @@ public static void Network_2016_03_30()
RunSwaggerTest("Network", "2016-03-30", "network.json");
}
+ [Fact]
+ public static void PowerBIEmbedded_2016_01_29()
+ {
+ RunSwaggerTest("PowerBIEmbedded", "2016-01-29", "powerbiembedded.json");
+ }
+
+ [Fact]
+ public static void Redis_2016_04_01()
+ {
+ RunSwaggerTest("Redis", "2016-04-01", "redis.json");
+ }
+
+ [Fact]
+ public static void Resources_2016_02_01()
+ {
+ RunSwaggerTest("Resources", "2016-02-01", "resources.json");
+ }
+
+ [Fact]
+ public static void Scheduler_2016_03_01()
+ {
+ RunSwaggerTest("Scheduler", "2016-03-01", "scheduler.json");
+ }
+
+ [Fact]
+ public static void Search_2015_02_28()
+ {
+ RunSwaggerTest("Search", "2015-02-28", "search.json");
+ }
+
[Fact]
public static void Storage_2015_05_01_preview()
{
@@ -113,6 +155,12 @@ public static void Storage_2016_01_01()
RunSwaggerTest("Storage", "2016-01-01", "storage.json");
}
+ [Fact]
+ public static void TrafficManager_2015_11_01()
+ {
+ RunSwaggerTest("TrafficManager", "2015-11-01", "trafficmanager.json");
+ }
+
[Fact]
public static void Web()
{
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json
index c591108e2556..919093e85195 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json
@@ -47,16 +47,16 @@
}
],
"description": "The properties of the account."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/batchAccounts_applications_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/batchAccounts_applications_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -95,16 +95,16 @@
"displayName": {
"type": "string",
"description": "The display name for the application."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/batchAccounts_applications_versions_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/batchAccounts_applications_versions_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -196,16 +196,16 @@
"displayName": {
"type": "string",
"description": "The display name for the application."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/batchAccounts_applications_versions_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/batchAccounts_applications_versions_childResource"
+ }
+ ]
+ }
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json
index 3360b84c0ad4..8f5ba0b84682 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2015-06-01/Microsoft.Cdn.json
@@ -46,16 +46,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -108,19 +108,19 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
- },
- {
- "$ref": "#/definitions/profiles_endpoints_origins_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
+ },
+ {
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -342,7 +342,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Defines the query string caching behavior. Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'"
+ "description": "Defines the query string caching behavior."
},
"origins": {
"oneOf": [
@@ -458,19 +458,19 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
- },
- {
- "$ref": "#/definitions/profiles_endpoints_origins_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
+ },
+ {
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -563,7 +563,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Name of the pricing tier. Possible values include: 'Standard', 'Premium'"
+ "description": "Name of the pricing tier."
}
},
"description": "The SKU (pricing tier) of the CDN profile."
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json
index 4cd51d56fba6..5c9d5c86e36c 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json
@@ -47,16 +47,16 @@
}
],
"description": "The SKU (pricing tier) of the CDN profile."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -109,19 +109,19 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
- },
- {
- "$ref": "#/definitions/profiles_endpoints_origins_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
+ },
+ {
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -343,7 +343,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Defines the query string caching behavior. Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'"
+ "description": "Defines the query string caching behavior."
},
"origins": {
"oneOf": [
@@ -440,19 +440,19 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
- },
- {
- "$ref": "#/definitions/profiles_endpoints_origins_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
+ },
+ {
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -547,7 +547,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', 'Standard_Akamai'"
+ "description": "Name of the pricing tier."
}
},
"description": "The SKU (pricing tier) of the CDN profile."
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CognitiveServices/2016-02-01-preview/Microsoft.CognitiveServices.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CognitiveServices/2016-02-01-preview/Microsoft.CognitiveServices.json
index 3e62c08aaf8c..056498088f81 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CognitiveServices/2016-02-01-preview/Microsoft.CognitiveServices.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CognitiveServices/2016-02-01-preview/Microsoft.CognitiveServices.json
@@ -48,7 +48,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Required. Indicates the type of cognitive service account. Possible values include: 'ComputerVision', 'Emotion', 'Face', 'LUIS', 'Recommendations', 'Speech', 'TextAnalytics', 'WebLM'"
+ "description": "Required. Indicates the type of cognitive service account."
},
"location": {
"type": "string",
@@ -112,7 +112,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the sku name. Required for account creation, optional for update. Possible values include: 'F0', 'S0', 'S1', 'S2', 'S3', 'S4'"
+ "description": "Gets or sets the sku name. Required for account creation, optional for update."
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2015-06-15/Microsoft.Compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2015-06-15/Microsoft.Compute.json
index cc93e2caf023..2af14dd82cb0 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2015-06-15/Microsoft.Compute.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2015-06-15/Microsoft.Compute.json
@@ -72,16 +72,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/virtualMachines_extensions_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/virtualMachines_extensions_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -185,7 +185,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the pass name. Currently, the only allowable value is oobeSystem. Possible values include: 'oobeSystem'"
+ "description": "Gets or sets the pass name. Currently, the only allowable value is oobeSystem."
},
"componentName": {
"oneOf": [
@@ -199,7 +199,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'"
+ "description": "Gets or sets the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup."
},
"settingName": {
"oneOf": [
@@ -214,7 +214,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon ). Possible values include: 'AutoLogon', 'FirstLogonCommands'"
+ "description": "Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon )."
},
"content": {
"type": "string",
@@ -364,7 +364,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -380,7 +380,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"diskSizeGB": {
"oneOf": [
@@ -527,7 +527,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The virtual machine size name. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'"
+ "description": "The virtual machine size name."
}
},
"description": "Describes a hardware profile."
@@ -575,7 +575,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the level Code. Possible values include: 'Info', 'Warning', 'Error'"
+ "description": "Gets or sets the level Code."
},
"displayStatus": {
"type": "string",
@@ -744,7 +744,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'"
+ "description": "Gets or sets the Operating System type."
},
"encryptionSettings": {
"oneOf": [
@@ -797,7 +797,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -813,7 +813,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"diskSizeGB": {
"oneOf": [
@@ -1040,7 +1040,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the upgrade mode. Possible values include: 'Automatic', 'Manual'"
+ "description": "Gets or sets the upgrade mode."
}
},
"description": "Describes an upgrade policy - automatic or manual."
@@ -1161,7 +1161,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets how the extension handler should be forced to update even if the extension configuration has not changed. Possible values include: 'RerunExtension'"
+ "description": "Gets or sets how the extension handler should be forced to update even if the extension configuration has not changed."
},
"publisher": {
"type": "string",
@@ -1611,7 +1611,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -1627,7 +1627,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"osType": {
"oneOf": [
@@ -1642,7 +1642,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'"
+ "description": "Gets or sets the Operating System type."
},
"image": {
"oneOf": [
@@ -1948,7 +1948,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Protocol used by WinRM listener. Currently only Http and Https are supported. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the Protocol used by WinRM listener. Currently only Http and Https are supported."
},
"certificateUrl": {
"type": "string",
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json
index a71cb6e63269..43464958da8f 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json
@@ -72,16 +72,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/virtualMachines_extensions_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/virtualMachines_extensions_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -185,7 +185,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the pass name. Currently, the only allowable value is oobeSystem. Possible values include: 'oobeSystem'"
+ "description": "Gets or sets the pass name. Currently, the only allowable value is oobeSystem."
},
"componentName": {
"oneOf": [
@@ -199,7 +199,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'Microsoft-Windows-Shell-Setup'"
+ "description": "Gets or sets the component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup."
},
"settingName": {
"oneOf": [
@@ -214,7 +214,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon ). Possible values include: 'AutoLogon', 'FirstLogonCommands'"
+ "description": "Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon )."
},
"content": {
"type": "string",
@@ -364,7 +364,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -380,7 +380,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"diskSizeGB": {
"oneOf": [
@@ -535,7 +535,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The virtual machine size name. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5'"
+ "description": "The virtual machine size name."
}
},
"description": "Describes a hardware profile."
@@ -583,7 +583,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the level Code. Possible values include: 'Info', 'Warning', 'Error'"
+ "description": "Gets or sets the level Code."
},
"displayStatus": {
"type": "string",
@@ -752,7 +752,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'"
+ "description": "Gets or sets the Operating System type."
},
"encryptionSettings": {
"oneOf": [
@@ -805,7 +805,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -821,7 +821,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"diskSizeGB": {
"oneOf": [
@@ -1048,7 +1048,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the upgrade mode. Possible values include: 'Automatic', 'Manual'"
+ "description": "Gets or sets the upgrade mode."
}
},
"description": "Describes an upgrade policy - automatic or manual."
@@ -1627,7 +1627,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'"
+ "description": "Gets or sets the caching type."
},
"createOption": {
"oneOf": [
@@ -1643,7 +1643,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the create option. Possible values include: 'fromImage', 'empty', 'attach'"
+ "description": "Gets or sets the create option."
},
"osType": {
"oneOf": [
@@ -1658,7 +1658,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'"
+ "description": "Gets or sets the Operating System type."
},
"image": {
"oneOf": [
@@ -1964,7 +1964,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the Protocol used by WinRM listener. Currently only Http and Https are supported. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the Protocol used by WinRM listener. Currently only Http and Https are supported."
},
"certificateUrl": {
"type": "string",
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2015-05-04-preview/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2015-05-04-preview/Microsoft.Network.json
index 87fab4f947e7..0026e4214d0c 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2015-05-04-preview/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2015-05-04-preview/Microsoft.Network.json
@@ -33,40 +33,40 @@
}
],
"description": "Gets or sets the properties of the zone."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/dnszones_TXT_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_SRV_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_SOA_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_PTR_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_NS_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_MX_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_CNAME_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_AAAA_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_A_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/dnszones_TXT_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_SRV_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_SOA_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_PTR_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_NS_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_MX_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_CNAME_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_AAAA_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_A_childResource"
+ }
+ ]
+ }
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json
index 7789f4283e20..a5128a061a2d 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json
@@ -33,40 +33,40 @@
}
],
"description": "Gets or sets the properties of the zone."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/dnszones_TXT_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_SRV_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_SOA_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_PTR_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_NS_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_MX_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_CNAME_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_AAAA_childResource"
- },
- {
- "$ref": "#/definitions/dnszones_A_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/dnszones_TXT_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_SRV_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_SOA_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_PTR_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_NS_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_MX_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_CNAME_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_AAAA_childResource"
+ },
+ {
+ "$ref": "#/definitions/dnszones_A_childResource"
+ }
+ ]
+ }
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DataLakeStore/2015-10-01-preview/Microsoft.DataLakeStore.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DataLakeStore/2015-10-01-preview/Microsoft.DataLakeStore.json
index f0d15da28af0..4212e09a5c7a 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DataLakeStore/2015-10-01-preview/Microsoft.DataLakeStore.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DataLakeStore/2015-10-01-preview/Microsoft.DataLakeStore.json
@@ -51,16 +51,16 @@
}
],
"description": "Gets or sets the Data Lake Store account properties."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/accounts_firewallRules_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/accounts_firewallRules_childResource"
+ }
+ ]
+ }
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DevTestLabs/2015-05-21-preview/Microsoft.DevTestLabs.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DevTestLabs/2015-05-21-preview/Microsoft.DevTestLabs.json
index f0fca2c12676..129bc50bb715 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DevTestLabs/2015-05-21-preview/Microsoft.DevTestLabs.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DevTestLabs/2015-05-21-preview/Microsoft.DevTestLabs.json
@@ -55,31 +55,31 @@
}
],
"description": "The tags of the resource."
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/labs_virtualnetworks_childResource"
- },
- {
- "$ref": "#/definitions/labs_virtualmachines_childResource"
- },
- {
- "$ref": "#/definitions/labs_schedules_childResource"
- },
- {
- "$ref": "#/definitions/labs_formulas_childResource"
- },
- {
- "$ref": "#/definitions/labs_customimages_childResource"
- },
- {
- "$ref": "#/definitions/labs_artifactsources_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/labs_virtualnetworks_childResource"
+ },
+ {
+ "$ref": "#/definitions/labs_virtualmachines_childResource"
+ },
+ {
+ "$ref": "#/definitions/labs_schedules_childResource"
+ },
+ {
+ "$ref": "#/definitions/labs_formulas_childResource"
+ },
+ {
+ "$ref": "#/definitions/labs_customimages_childResource"
+ },
+ {
+ "$ref": "#/definitions/labs_artifactsources_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -605,7 +605,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of the artifact source. Possible values include: 'VsoGit', 'GitHub'"
+ "description": "The type of the artifact source."
},
"folderPath": {
"type": "string",
@@ -632,7 +632,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The status of the artifact source. Possible values include: 'Enabled', 'Disabled'"
+ "description": "The status of the artifact source."
},
"provisioningState": {
"type": "string",
@@ -683,7 +683,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The OS type of the custom image. Possible values include: 'Windows', 'Linux', 'None'"
+ "description": "The OS type of the custom image."
},
"author": {
"type": "string",
@@ -918,7 +918,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of the lab storage. Possible values include: 'Standard', 'Premium'"
+ "description": "The type of the lab storage."
},
"defaultVirtualNetworkId": {
"type": "string",
@@ -1484,7 +1484,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The state of the Linux OS. Possible values include: 'NonDeprovisioned', 'DeprovisionRequested', 'DeprovisionApplied'"
+ "description": "The state of the Linux OS."
}
},
"description": "Information about a Linux OS."
@@ -1509,7 +1509,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The status of the policy. Possible values include: 'Enabled', 'Disabled'"
+ "description": "The status of the policy."
},
"factName": {
"oneOf": [
@@ -1527,7 +1527,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The fact name of the policy. Possible values include: 'UserOwnedLabVmCount', 'LabVmCount', 'LabVmSize', 'GalleryImage', 'UserOwnedLabVmCountInSubnet'"
+ "description": "The fact name of the policy."
},
"factData": {
"type": "string",
@@ -1550,7 +1550,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The evaluator type of the policy. Possible values include: 'AllowedValuesPolicy', 'MaxValuePolicy'"
+ "description": "The evaluator type of the policy."
},
"provisioningState": {
"type": "string",
@@ -1575,7 +1575,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The status of the schedule. Possible values include: 'Enabled', 'Disabled'"
+ "description": "The status of the schedule."
},
"taskType": {
"oneOf": [
@@ -1591,7 +1591,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The task type of the schedule. Possible values include: 'LabVmsShutdownTask', 'LabVmsStartupTask', 'LabBillingTask'"
+ "description": "The task type of the schedule."
},
"weeklyRecurrence": {
"oneOf": [
@@ -1659,8 +1659,7 @@
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ],
- "description": "Possible values include: 'Default', 'Deny', 'Allow'"
+ ]
}
}
},
@@ -1689,7 +1688,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Indicates whether this subnet can be used during virtual machine creation. Possible values include: 'Default', 'Deny', 'Allow'"
+ "description": "Indicates whether this subnet can be used during virtual machine creation."
},
"usePublicIpAddressPermission": {
"oneOf": [
@@ -1705,7 +1704,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Indicates whether public IP addresses can be assigned to virtual machines on this subnet. Possible values include: 'Default', 'Deny', 'Allow'"
+ "description": "Indicates whether public IP addresses can be assigned to virtual machines on this subnet."
}
},
"description": "Property overrides on a subnet of a virtual network."
@@ -1797,7 +1796,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The state of the Windows OS. Possible values include: 'NonSysprepped', 'SysprepRequested', 'SysprepApplied'"
+ "description": "The state of the Windows OS."
}
},
"description": "Information about a Windows OS."
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Logic/2015-02-01-preview/Microsoft.Logic.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Logic/2015-02-01-preview/Microsoft.Logic.json
new file mode 100644
index 000000000000..f3861d1e0c2d
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Logic/2015-02-01-preview/Microsoft.Logic.json
@@ -0,0 +1,363 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2015-02-01-preview/Microsoft.Logic.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Logic",
+ "description": "Microsoft Logic Resource Types",
+ "resourceDefinitions": {
+ "workflows": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Logic/workflows"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-02-01-preview"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WorkflowProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the workflow properties."
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/workflows_accessKeys_childResource"
+ }
+ ]
+ }
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Logic/workflows"
+ },
+ "workflows_accessKeys": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Logic/workflows/accessKeys"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-02-01-preview"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WorkflowAccessKeyProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the workflow access key properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Logic/workflows/accessKeys"
+ }
+ },
+ "definitions": {
+ "ContentHash": {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "type": "string",
+ "description": "Gets or sets the algorithm."
+ },
+ "value": {
+ "type": "string",
+ "description": "Gets or sets the value."
+ }
+ }
+ },
+ "ContentLink": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "Gets or sets the content link URI."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "Gets or sets the content version."
+ },
+ "contentSize": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the content size."
+ },
+ "contentHash": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ContentHash"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the content hash."
+ },
+ "metadata": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the metadata."
+ }
+ }
+ },
+ "ResourceReference": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the resource id."
+ }
+ }
+ },
+ "Sku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Free",
+ "Shared",
+ "Basic",
+ "Standard",
+ "Premium"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the name."
+ },
+ "plan": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ResourceReference"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the reference to plan."
+ }
+ }
+ },
+ "WorkflowAccessKeyProperties": {
+ "type": "object",
+ "properties": {
+ "notBefore": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the not-before time."
+ },
+ "notAfter": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the not-after time."
+ }
+ }
+ },
+ "WorkflowParameter": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "String",
+ "SecureString",
+ "Int",
+ "Float",
+ "Bool",
+ "Array",
+ "Object",
+ "SecureObject"
+ ],
+ "description": "Gets or sets the type."
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the value."
+ },
+ "metadata": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the metadata."
+ }
+ }
+ },
+ "WorkflowProperties": {
+ "type": "object",
+ "properties": {
+ "state": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Enabled",
+ "Disabled",
+ "Deleted",
+ "Suspended"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the state."
+ },
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Sku"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the sku."
+ },
+ "definitionLink": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ContentLink"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the link to definition."
+ },
+ "definition": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the definition."
+ },
+ "parametersLink": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ContentLink"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the link to parameters."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/WorkflowParameter"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the parameters."
+ }
+ }
+ },
+ "workflows_accessKeys_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "accessKeys"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-02-01-preview"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WorkflowAccessKeyProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the workflow access key properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Logic/workflows/accessKeys"
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/MachineLearning/2016-05-01-preview/Microsoft.MachineLearning.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/MachineLearning/2016-05-01-preview/Microsoft.MachineLearning.json
new file mode 100644
index 000000000000..8430b8c35941
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/MachineLearning/2016-05-01-preview/Microsoft.MachineLearning.json
@@ -0,0 +1,893 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2016-05-01-preview/Microsoft.MachineLearning.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.MachineLearning",
+ "description": "Microsoft MachineLearning Resource Types",
+ "resourceDefinitions": {
+ "webServices": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.MachineLearning/webServices"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-05-01-preview"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WebServiceProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Web service resource properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.MachineLearning/webServices"
+ }
+ },
+ "definitions": {
+ "AssetItem": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Asset's friendly name."
+ },
+ "id": {
+ "type": "string",
+ "description": "Asset's Id."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "Module",
+ "Resource"
+ ],
+ "description": "Asset's type."
+ },
+ "locationInfo": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/AssetLocation"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Access information for the asset."
+ },
+ "inputPorts": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/InputPort"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Information about the asset's input ports."
+ },
+ "outputPorts": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/OutputPort"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Information about the asset's output ports."
+ },
+ "metadata": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If the asset is a custom module, this holds the module's metadata."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ModuleAssetParameter"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If the asset is a custom module, this holds the module's parameters."
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "locationInfo"
+ ],
+ "description": "Information about an asset associated with the web service."
+ },
+ "AssetLocation": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "format": "url",
+ "description": "The URI where the asset is accessible from, (e.g. aml://abc for system assets or https://xyz for user asets"
+ },
+ "credentials": {
+ "type": "string",
+ "description": "Access credentials for the asset, if applicable (e.g. asset specified by storage account connection string + blob URI)"
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Describes the access location for a web service asset."
+ },
+ "ColumnSpecification": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Boolean",
+ "Integer",
+ "Number",
+ "String"
+ ],
+ "description": "Data type of the column."
+ },
+ "format": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Byte",
+ "Char",
+ "Datetime",
+ "Double",
+ "Duration",
+ "Float",
+ "Int8",
+ "Int16",
+ "Int32",
+ "Int64",
+ "Uint8",
+ "Uint16",
+ "Uint32",
+ "Uint64"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Additional format information for the data type."
+ },
+ "enum": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If the data type is categorical, this provides the list of accepted categories."
+ },
+ "x-ms-isnullable": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Flag indicating if the type supports null values or not."
+ },
+ "x-ms-isordered": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Flag indicating whether the categories are treated as an ordered set or not, if this is a categorical column."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "description": "Swagger 2.0 schema for a column within the data table representing a web service input or output. See Swagger specification: http://swagger.io/specification/"
+ },
+ "CommitmentPlan": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The commitment plan ARM resource id."
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "description": "Information about the machine learning commitment plan associated with the web service."
+ },
+ "DiagnosticsConfiguration": {
+ "type": "object",
+ "properties": {
+ "level": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "None",
+ "Error",
+ "All"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Level of tracing to be used: None - disables tracing; Error - collects only error (stderr) traces; All - collects all traces (stdout and stderr)."
+ },
+ "expiry": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Moment of time after which diagnostics are no longer collected. If null, diagnostic collection is not time limited."
+ }
+ },
+ "required": [
+ "level"
+ ],
+ "description": "Diagnostics settings for an Azure ML web service."
+ },
+ "ExampleRequest": {
+ "type": "object",
+ "properties": {
+ "inputs": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Sample input data for the web service's input(s) given as an input name to sample input values matrix map."
+ },
+ "globalParameters": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Sample input data for the web service's global parameters"
+ }
+ },
+ "description": "Sample input data for the service's input(s)."
+ },
+ "GraphEdge": {
+ "type": "object",
+ "properties": {
+ "sourceNodeId": {
+ "type": "string",
+ "description": "The source graph node's identifier."
+ },
+ "sourcePortId": {
+ "type": "string",
+ "description": "The identifier of the source node's port that the edge connects from."
+ },
+ "targetNodeId": {
+ "type": "string",
+ "description": "The destination graph node's identifier."
+ },
+ "targetPortId": {
+ "type": "string",
+ "description": "The identifier of the destination node's port that the edge connects into."
+ }
+ },
+ "description": "Defines an edge within the web service's graph."
+ },
+ "GraphNode": {
+ "type": "object",
+ "properties": {
+ "assetId": {
+ "type": "string",
+ "description": "The id of the asset represented by this node."
+ },
+ "inputId": {
+ "type": "string",
+ "description": "The id of the input element represented by this node."
+ },
+ "outputId": {
+ "type": "string",
+ "description": "The id of the output element represented by this node."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If applicable, parameters of the node. Global graph parameters map into these, with values set at runtime."
+ }
+ },
+ "description": "Specifies a node in the web service graph. The node can either be an input, output or asset node, so only one of the corresponding id properties is populated at any given time."
+ },
+ "GraphPackage": {
+ "type": "object",
+ "properties": {
+ "nodes": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/GraphNode"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The set of nodes making up the graph, provided as a nodeId to GraphNode map"
+ },
+ "edges": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/GraphEdge"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The list of edges making up the graph."
+ },
+ "graphParameters": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/GraphParameter"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The collection of global parameters for the graph, given as a global parameter name to GraphParameter map. Each parameter here has a 1:1 match with the global parameters values map declared at the WebServiceProperties level."
+ }
+ },
+ "description": "Defines the graph of modules making up the machine learning solution."
+ },
+ "GraphParameter": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "Description of this graph parameter."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "String",
+ "Int",
+ "Float",
+ "Enumerated",
+ "Script",
+ "Mode",
+ "Credential",
+ "Boolean",
+ "Double",
+ "ColumnPicker",
+ "ParameterRange",
+ "DataGatewayName"
+ ],
+ "description": "Graph parameter's type."
+ },
+ "links": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/GraphParameterLink"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Association links for this parameter to nodes in the graph."
+ }
+ },
+ "required": [
+ "type",
+ "links"
+ ],
+ "description": "Defines a global parameter in the graph."
+ },
+ "GraphParameterLink": {
+ "type": "object",
+ "properties": {
+ "nodeId": {
+ "type": "string",
+ "description": "The graph node's identifier"
+ },
+ "parameterKey": {
+ "type": "string",
+ "description": "The identifier of the node parameter that the global parameter maps to."
+ }
+ },
+ "required": [
+ "nodeId",
+ "parameterKey"
+ ],
+ "description": "Association link for a graph global parameter to a node in the graph."
+ },
+ "InputPort": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Dataset"
+ ],
+ "description": "Port data type."
+ }
+ },
+ "description": "Asset input port"
+ },
+ "MachineLearningWorkspace": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The workspace ARM resource id."
+ }
+ },
+ "required": [
+ "id"
+ ],
+ "description": "Information about the machine learning workspace containing the experiment that is source for the web service."
+ },
+ "ModeValueInfo": {
+ "type": "object",
+ "properties": {
+ "interfaceString": {
+ "type": "string",
+ "description": "The interface string name for the nested parameter."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ModuleAssetParameter"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The definition of the parameter."
+ }
+ },
+ "description": "Nested parameter definition."
+ },
+ "ModuleAssetParameter": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Parameter name."
+ },
+ "parameterType": {
+ "type": "string",
+ "description": "Parameter type."
+ },
+ "modeValuesInfo": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ModeValueInfo"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Definitions for nested interface parameters if this is a complex module parameter."
+ }
+ },
+ "description": "Parameter definition for a module asset."
+ },
+ "OutputPort": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Dataset"
+ ],
+ "description": "Port data type."
+ }
+ },
+ "description": "Asset output port"
+ },
+ "RealtimeConfiguration": {
+ "type": "object",
+ "properties": {
+ "maxConcurrentCalls": {
+ "oneOf": [
+ {
+ "type": "integer",
+ "minimum": 4,
+ "maximum": 200
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Maximum number of concurrent calls allowed on the realtime endpoint."
+ }
+ },
+ "description": "Holds the available configuration options for an Azure ML web service endpoint."
+ },
+ "ServiceInputOutputSpecification": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Swagger schema title."
+ },
+ "description": {
+ "type": "string",
+ "description": "Swagger schema description."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "object"
+ ],
+ "description": "The type of the entity described in swagger. Always 'object'."
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/TableSpecification"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Map of name to swagger schema for each input or output of the web service."
+ }
+ },
+ "required": [
+ "type",
+ "properties"
+ ],
+ "description": "The swagger 2.0 schema describing the service's inputs or outputs. See Swagger specification: http://swagger.io/specification/"
+ },
+ "StorageAccount": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The storage account's name."
+ },
+ "key": {
+ "type": "string",
+ "description": "The storage account's active key."
+ }
+ },
+ "description": "Access information for a storage account."
+ },
+ "TableSpecification": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Swagger schema title."
+ },
+ "description": {
+ "type": "string",
+ "description": "Swagger schema description."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "object"
+ ],
+ "description": "The type of the entity described in swagger."
+ },
+ "format": {
+ "type": "string",
+ "description": "The format, if 'type' is not 'object'"
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/ColumnSpecification"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The set of columns within the data table."
+ }
+ },
+ "required": [
+ "type"
+ ],
+ "description": "The swagger 2.0 schema describing a single service input or output. See Swagger specification: http://swagger.io/specification/"
+ },
+ "WebServiceKeys": {
+ "type": "object",
+ "properties": {
+ "primary": {
+ "type": "string",
+ "description": "The primary access key."
+ },
+ "secondary": {
+ "type": "string",
+ "description": "The secondary access key."
+ }
+ },
+ "description": "Access keys for the web service calls."
+ },
+ "WebServiceProperties": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "The title of the Azure ML web service."
+ },
+ "description": {
+ "type": "string",
+ "description": "The description of the Azure ML web service."
+ },
+ "keys": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WebServiceKeys"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The set of access keys for the web service. If not specified at creation time (PUT), they will be generated automatically by the resource provider."
+ },
+ "readOnly": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If true, the web service can no longer be updated / patched, only removed. Otherwise, the service resource supports changes."
+ },
+ "exposeSampleData": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Flag that controls whether to expose sample data or not in the web service's swagger definition."
+ },
+ "realtimeConfiguration": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RealtimeConfiguration"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Configuration for the service's realtime endpoint."
+ },
+ "diagnostics": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/DiagnosticsConfiguration"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Settings controlling the diagnostics traces collection for the web service."
+ },
+ "storageAccount": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/StorageAccount"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The storage account associated with the service. This is used to store both datasets and diagnostic traces. This information is required at creation time (PUT) and only the key is updateable after that. The account credentials are hidden on a GET web service call."
+ },
+ "machineLearningWorkspace": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/MachineLearningWorkspace"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "This is only populated at creation time (PUT) for web services originating from an AzureML Studio experiment."
+ },
+ "commitmentPlan": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/CommitmentPlan"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The commitment plan associated with this web service. This is required to be specified at creation time (PUT) and is not updateable afterwards."
+ },
+ "input": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceInputOutputSpecification"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Swagger schema for the service's input(s), as applicable."
+ },
+ "output": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceInputOutputSpecification"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Swagger schema for the service's output(s), as applicable."
+ },
+ "exampleRequest": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ExampleRequest"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Sample request data for each of the service's inputs, as applicable."
+ },
+ "assets": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/AssetItem"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Set of assets associated with the web service."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The set of global parameters values defined for the web service, given as a global parameter name to default value map. If no default value is specified, the parameter is considered to be required."
+ },
+ "package": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/GraphPackage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The definition of the graph package making up this web service."
+ },
+ "packageType": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Graph"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "description": "The set of properties specific to the Azure ML web service resource."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-05-01-preview/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-05-01-preview/Microsoft.Network.json
index 918293220074..3aca4304a737 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-05-01-preview/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-05-01-preview/Microsoft.Network.json
@@ -299,16 +299,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -387,16 +387,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/routeTables_routes_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/routeTables_routes_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -512,16 +512,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/virtualnetworks_subnets_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/virtualnetworks_subnets_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -729,7 +729,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"cookieBasedAffinity": {
"oneOf": [
@@ -744,7 +744,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the cookie affinity. Possible values include: 'Enabled', 'Disabled'"
+ "description": "Gets or sets the cookie affinity."
},
"provisioningState": {
"type": "string",
@@ -801,7 +801,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -947,7 +947,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"sslCertificate": {
"oneOf": [
@@ -1196,7 +1196,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the rule type. Possible values include: 'Basic'"
+ "description": "Gets or sets the rule type."
},
"backendAddressPool": {
"oneOf": [
@@ -1255,7 +1255,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets name of application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large'"
+ "description": "Gets or sets name of application gateway SKU."
},
"tier": {
"oneOf": [
@@ -1269,7 +1269,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets tier of application gateway. Possible values include: 'Standard'"
+ "description": "Gets or sets tier of application gateway."
},
"capacity": {
"oneOf": [
@@ -1355,7 +1355,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AuthorizationUseStatus. Possible values include: 'Available', 'InUse'"
+ "description": "Gets or sets AuthorizationUseStatus."
},
"provisioningState": {
"type": "string",
@@ -1492,7 +1492,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource . Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'"
+ "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource ."
},
"customerASN": {
"oneOf": [
@@ -1529,7 +1529,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PeeringType. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'"
+ "description": "Gets or sets PeeringType."
},
"state": {
"oneOf": [
@@ -1544,7 +1544,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets state of Peering. Possible values include: 'Disabled', 'Enabled'"
+ "description": "Gets or sets state of Peering."
},
"azureASN": {
"oneOf": [
@@ -1703,7 +1703,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -1845,7 +1845,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPortRangeStart": {
"oneOf": [
@@ -1959,7 +1959,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPort": {
"oneOf": [
@@ -2206,7 +2206,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp."
},
"loadDistribution": {
"oneOf": [
@@ -2222,7 +2222,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'"
+ "description": "Gets or sets the load distribution policy for this rule."
},
"frontendPort": {
"oneOf": [
@@ -2441,7 +2441,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -2834,7 +2834,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'"
+ "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful."
},
"port": {
"oneOf": [
@@ -2934,7 +2934,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'"
+ "description": "Gets or sets the type of Azure hop the packet should be sent to."
},
"nextHopIpAddress": {
"type": "string",
@@ -3078,7 +3078,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). Possible values include: 'Tcp', 'Udp', '*'"
+ "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*)."
},
"sourcePortRange": {
"type": "string",
@@ -3109,7 +3109,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'"
+ "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'."
},
"priority": {
"oneOf": [
@@ -3135,7 +3135,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values include: 'Inbound', 'Outbound'"
+ "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic."
},
"provisioningState": {
"type": "string",
@@ -3328,7 +3328,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'"
+ "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet."
},
"routingWeight": {
"oneOf": [
@@ -3360,7 +3360,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'"
+ "description": "Virtual network Gateway connection status."
},
"egressBytesTransferred": {
"oneOf": [
@@ -3454,7 +3454,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -3515,7 +3515,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'"
+ "description": "The type of this virtual network gateway."
},
"vpnType": {
"oneOf": [
@@ -3530,7 +3530,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'"
+ "description": "The type of this virtual network gateway."
},
"enableBgp": {
"oneOf": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-06-15/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-06-15/Microsoft.Network.json
index 2c345c58453e..1d1f2036493e 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-06-15/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2015-06-15/Microsoft.Network.json
@@ -299,16 +299,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -424,16 +424,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/routeTables_routes_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/routeTables_routes_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -549,16 +549,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/virtualnetworks_subnets_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/virtualnetworks_subnets_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -766,7 +766,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"cookieBasedAffinity": {
"oneOf": [
@@ -781,7 +781,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the cookie affinity. Possible values include: 'Enabled', 'Disabled'"
+ "description": "Gets or sets the cookie affinity."
},
"requestTimeout": {
"oneOf": [
@@ -860,7 +860,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -1006,7 +1006,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"hostName": {
"type": "string",
@@ -1208,7 +1208,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"host": {
"type": "string",
@@ -1467,7 +1467,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the rule type. Possible values include: 'Basic', 'PathBasedRouting'"
+ "description": "Gets or sets the rule type."
},
"backendAddressPool": {
"oneOf": [
@@ -1537,7 +1537,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets name of application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large'"
+ "description": "Gets or sets name of application gateway SKU."
},
"tier": {
"oneOf": [
@@ -1551,7 +1551,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets tier of application gateway. Possible values include: 'Standard'"
+ "description": "Gets or sets tier of application gateway."
},
"capacity": {
"oneOf": [
@@ -1711,7 +1711,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AuthorizationUseStatus. Possible values include: 'Available', 'InUse'"
+ "description": "Gets or sets AuthorizationUseStatus."
},
"provisioningState": {
"type": "string",
@@ -1879,7 +1879,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource . Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'"
+ "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource ."
},
"customerASN": {
"oneOf": [
@@ -1916,7 +1916,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PeeringType. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'"
+ "description": "Gets or sets PeeringType."
},
"state": {
"oneOf": [
@@ -1931,7 +1931,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets state of Peering. Possible values include: 'Disabled', 'Enabled'"
+ "description": "Gets or sets state of Peering."
},
"azureASN": {
"oneOf": [
@@ -2146,7 +2146,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -2232,7 +2232,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPortRangeStart": {
"oneOf": [
@@ -2346,7 +2346,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPort": {
"oneOf": [
@@ -2447,7 +2447,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -2667,7 +2667,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp."
},
"loadDistribution": {
"oneOf": [
@@ -2683,7 +2683,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'"
+ "description": "Gets or sets the load distribution policy for this rule."
},
"frontendPort": {
"oneOf": [
@@ -2981,7 +2981,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -3384,7 +3384,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'"
+ "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful."
},
"port": {
"oneOf": [
@@ -3509,7 +3509,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PublicIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PublicIP allocation method (Static/Dynamic)."
},
"ipConfiguration": {
"oneOf": [
@@ -3608,7 +3608,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'"
+ "description": "Gets or sets the type of Azure hop the packet should be sent to."
},
"nextHopIpAddress": {
"type": "string",
@@ -3794,7 +3794,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). Possible values include: 'Tcp', 'Udp', '*'"
+ "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*)."
},
"sourcePortRange": {
"type": "string",
@@ -3825,7 +3825,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'"
+ "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'."
},
"priority": {
"oneOf": [
@@ -3851,7 +3851,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values include: 'Inbound', 'Outbound'"
+ "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic."
},
"provisioningState": {
"type": "string",
@@ -4046,7 +4046,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'"
+ "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet."
},
"routingWeight": {
"oneOf": [
@@ -4078,7 +4078,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'"
+ "description": "Virtual network Gateway connection status."
},
"egressBytesTransferred": {
"oneOf": [
@@ -4183,7 +4183,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -4244,7 +4244,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'"
+ "description": "The type of this virtual network gateway."
},
"vpnType": {
"oneOf": [
@@ -4259,7 +4259,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'"
+ "description": "The type of this virtual network gateway."
},
"enableBgp": {
"oneOf": [
@@ -4344,7 +4344,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway sku name -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'"
+ "description": "Gateway sku name -Basic/HighPerformance/Standard."
},
"tier": {
"oneOf": [
@@ -4360,7 +4360,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway sku tier -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'"
+ "description": "Gateway sku tier -Basic/HighPerformance/Standard."
},
"capacity": {
"oneOf": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json
index 0641162efbac..9d1860e8ba94 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json
@@ -117,19 +117,19 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/expressRouteCircuits_peerings_childResource"
- },
- {
- "$ref": "#/definitions/expressRouteCircuits_authorizations_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/expressRouteCircuits_peerings_childResource"
+ },
+ {
+ "$ref": "#/definitions/expressRouteCircuits_authorizations_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -360,16 +360,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -485,16 +485,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/routeTables_routes_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/routeTables_routes_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -610,16 +610,16 @@
"etag": {
"type": "string",
"description": "Gets a unique read-only string that changes whenever the resource is updated"
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/virtualnetworks_subnets_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/virtualnetworks_subnets_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -827,7 +827,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"cookieBasedAffinity": {
"oneOf": [
@@ -842,7 +842,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the cookie affinity. Possible values include: 'Enabled', 'Disabled'"
+ "description": "Gets or sets the cookie affinity."
},
"requestTimeout": {
"oneOf": [
@@ -921,7 +921,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -1067,7 +1067,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"hostName": {
"type": "string",
@@ -1269,7 +1269,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol. Possible values include: 'Http', 'Https'"
+ "description": "Gets or sets the protocol."
},
"host": {
"type": "string",
@@ -1528,7 +1528,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the rule type. Possible values include: 'Basic', 'PathBasedRouting'"
+ "description": "Gets or sets the rule type."
},
"backendAddressPool": {
"oneOf": [
@@ -1598,7 +1598,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets name of application gateway SKU. Possible values include: 'Standard_Small', 'Standard_Medium', 'Standard_Large'"
+ "description": "Gets or sets name of application gateway SKU."
},
"tier": {
"oneOf": [
@@ -1612,7 +1612,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets tier of application gateway. Possible values include: 'Standard'"
+ "description": "Gets or sets tier of application gateway."
},
"capacity": {
"oneOf": [
@@ -1772,7 +1772,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AuthorizationUseStatus. Possible values include: 'Available', 'InUse'"
+ "description": "Gets or sets AuthorizationUseStatus."
},
"provisioningState": {
"type": "string",
@@ -1996,7 +1996,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource . Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'"
+ "description": "Gets or sets AdvertisedPublicPrefixState of the Peering resource ."
},
"customerASN": {
"oneOf": [
@@ -2033,7 +2033,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PeeringType. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'"
+ "description": "Gets or sets PeeringType."
},
"state": {
"oneOf": [
@@ -2048,7 +2048,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets state of Peering. Possible values include: 'Disabled', 'Enabled'"
+ "description": "Gets or sets state of Peering."
},
"azureASN": {
"oneOf": [
@@ -2164,7 +2164,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets ServiceProviderProvisioningState state of the resource . Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'"
+ "description": "Gets or sets ServiceProviderProvisioningState state of the resource ."
},
"authorizations": {
"oneOf": [
@@ -2347,7 +2347,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets tier of the sku. Possible values include: 'Standard', 'Premium'"
+ "description": "Gets or sets tier of the sku."
},
"family": {
"oneOf": [
@@ -2362,7 +2362,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets family of the sku. Possible values include: 'UnlimitedData', 'MeteredData'"
+ "description": "Gets or sets family of the sku."
}
},
"description": "Contains sku in an ExpressRouteCircuit"
@@ -2521,7 +2521,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -2607,7 +2607,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPortRangeStart": {
"oneOf": [
@@ -2721,7 +2721,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport potocol for the external endpoint. Possible values are Udp or Tcp."
},
"frontendPort": {
"oneOf": [
@@ -2822,7 +2822,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -3042,7 +3042,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp. Possible values include: 'Udp', 'Tcp'"
+ "description": "Gets or sets the transport protocol for the external endpoint. Possible values are Udp or Tcp."
},
"loadDistribution": {
"oneOf": [
@@ -3058,7 +3058,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the load distribution policy for this rule. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'"
+ "description": "Gets or sets the load distribution policy for this rule."
},
"frontendPort": {
"oneOf": [
@@ -3374,7 +3374,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"privateIPAddressVersion": {
"oneOf": [
@@ -3389,7 +3389,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6'"
+ "description": "Gets or sets PrivateIP address version (IPv4/IPv6)."
},
"subnet": {
"oneOf": [
@@ -3792,7 +3792,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'Http', 'Tcp'"
+ "description": "Gets or sets the protocol of the end point. Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful."
},
"port": {
"oneOf": [
@@ -3917,7 +3917,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PublicIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PublicIP allocation method (Static/Dynamic)."
},
"publicIPAddressVersion": {
"oneOf": [
@@ -3932,7 +3932,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PublicIP address version (IPv4/IPv6). Possible values include: 'IPv4', 'IPv6'"
+ "description": "Gets or sets PublicIP address version (IPv4/IPv6)."
},
"ipConfiguration": {
"oneOf": [
@@ -4031,7 +4031,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the type of Azure hop the packet should be sent to. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'"
+ "description": "Gets or sets the type of Azure hop the packet should be sent to."
},
"nextHopIpAddress": {
"type": "string",
@@ -4217,7 +4217,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*). Possible values include: 'Tcp', 'Udp', '*'"
+ "description": "Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*)."
},
"sourcePortRange": {
"type": "string",
@@ -4248,7 +4248,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'"
+ "description": "Gets or sets network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'."
},
"priority": {
"oneOf": [
@@ -4274,7 +4274,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic. Possible values include: 'Inbound', 'Outbound'"
+ "description": "Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outcoming traffic."
},
"provisioningState": {
"type": "string",
@@ -4469,7 +4469,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'"
+ "description": "Gateway connection type -Ipsec/Dedicated/VpnClient/Vnet2Vnet."
},
"routingWeight": {
"oneOf": [
@@ -4501,7 +4501,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Virtual network Gateway connection status. Possible values include: 'Unknown', 'Connecting', 'Connected', 'NotConnected'"
+ "description": "Virtual network Gateway connection status."
},
"egressBytesTransferred": {
"oneOf": [
@@ -4606,7 +4606,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets PrivateIP allocation method (Static/Dynamic). Possible values include: 'Static', 'Dynamic'"
+ "description": "Gets or sets PrivateIP allocation method (Static/Dynamic)."
},
"subnet": {
"oneOf": [
@@ -4667,7 +4667,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'Vpn', 'ExpressRoute'"
+ "description": "The type of this virtual network gateway."
},
"vpnType": {
"oneOf": [
@@ -4682,7 +4682,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'"
+ "description": "The type of this virtual network gateway."
},
"enableBgp": {
"oneOf": [
@@ -4767,7 +4767,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway sku name -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'"
+ "description": "Gateway sku name -Basic/HighPerformance/Standard."
},
"tier": {
"oneOf": [
@@ -4783,7 +4783,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gateway sku tier -Basic/HighPerformance/Standard. Possible values include: 'Basic', 'HighPerformance', 'Standard'"
+ "description": "Gateway sku tier -Basic/HighPerformance/Standard."
},
"capacity": {
"oneOf": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/PowerBIEmbedded/2016-01-29/Microsoft.PowerBI.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/PowerBIEmbedded/2016-01-29/Microsoft.PowerBI.json
new file mode 100644
index 000000000000..4999bcaf49be
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/PowerBIEmbedded/2016-01-29/Microsoft.PowerBI.json
@@ -0,0 +1,96 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2016-01-29/Microsoft.PowerBI.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.PowerBI",
+ "description": "Microsoft PowerBI Resource Types",
+ "resourceDefinitions": {
+ "workspaceCollections": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.PowerBI/workspaceCollections"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-01-29"
+ ]
+ },
+ "location": {
+ "type": "string",
+ "description": "Azure location"
+ },
+ "tags": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/AzureSku"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion"
+ ],
+ "description": "Microsoft.PowerBI/workspaceCollections"
+ }
+ },
+ "definitions": {
+ "AzureSku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "S1"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "SKU name"
+ },
+ "tier": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Standard"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "SKU tier"
+ }
+ },
+ "required": [
+ "name",
+ "tier"
+ ]
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Redis/2016-04-01/Microsoft.Cache.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Redis/2016-04-01/Microsoft.Cache.json
new file mode 100644
index 000000000000..f94006e8ae8d
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Redis/2016-04-01/Microsoft.Cache.json
@@ -0,0 +1,179 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2016-04-01/Microsoft.Cache.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Cache",
+ "description": "Microsoft Cache Resource Types",
+ "resourceDefinitions": {
+ "Redis": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Cache/Redis"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-04-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RedisProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Redis cache properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Cache/Redis"
+ }
+ },
+ "definitions": {
+ "RedisProperties": {
+ "type": "object",
+ "properties": {
+ "redisVersion": {
+ "type": "string",
+ "description": "RedisVersion parameter has been deprecated. As such, it is no longer necessary to provide this parameter and any value specified is ignored."
+ },
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Sku"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "What sku of redis cache to deploy."
+ },
+ "redisConfiguration": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc."
+ },
+ "enableNonSslPort": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "If the value is true, then the non-ssl redis server port (6379) will be enabled."
+ },
+ "tenantSettings": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "tenantSettings"
+ },
+ "shardCount": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The number of shards to be created on a Premium Cluster Cache."
+ },
+ "subnetId": {
+ "type": "string",
+ "description": "The full resource ID of a subnet in a virtual network to deploy the redis cache in. Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1"
+ },
+ "staticIP": {
+ "type": "string",
+ "description": "Required when deploying a redis cache inside an existing Azure Virtual Network."
+ }
+ },
+ "required": [
+ "sku"
+ ],
+ "description": "Properties supplied to CreateOrUpdate redis operation."
+ },
+ "Sku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Basic",
+ "Standard",
+ "Premium"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "What type of redis cache to deploy. Valid values: (Basic, Standard, Premium)."
+ },
+ "family": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "C",
+ "P"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Which family to use. Valid values: (C, P)."
+ },
+ "capacity": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "What size of redis cache to deploy. Valid values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)"
+ }
+ },
+ "required": [
+ "name",
+ "family",
+ "capacity"
+ ],
+ "description": "Sku parameters supplied to the create redis operation."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Resources/2016-02-01/Microsoft.Resources.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Resources/2016-02-01/Microsoft.Resources.json
new file mode 100644
index 000000000000..53c65f563984
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Resources/2016-02-01/Microsoft.Resources.json
@@ -0,0 +1,163 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2016-02-01/Microsoft.Resources.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Resources",
+ "description": "Microsoft Resources Resource Types",
+ "resourceDefinitions": {
+ "deployments": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Resources/deployments"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-02-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/DeploymentProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the deployment properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Resources/deployments"
+ }
+ },
+ "definitions": {
+ "DebugSetting": {
+ "type": "object",
+ "properties": {
+ "detailLevel": {
+ "type": "string",
+ "description": "Gets or sets the debug detail level."
+ }
+ }
+ },
+ "DeploymentProperties": {
+ "type": "object",
+ "properties": {
+ "template": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the template content. Use only one of Template or TemplateLink."
+ },
+ "templateLink": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/TemplateLink"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
+ },
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "object"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink."
+ },
+ "parametersLink": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ParametersLink"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
+ },
+ "mode": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Incremental",
+ "Complete"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the deployment mode."
+ },
+ "debugSetting": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/DebugSetting"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the debug setting of the deployment."
+ }
+ },
+ "description": "Deployment properties."
+ },
+ "ParametersLink": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the deployment paramaters."
+ },
+ "TemplateLink": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the template."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Scheduler/2016-03-01/Microsoft.Scheduler.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Scheduler/2016-03-01/Microsoft.Scheduler.json
new file mode 100644
index 000000000000..34274db8af82
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Scheduler/2016-03-01/Microsoft.Scheduler.json
@@ -0,0 +1,1003 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2016-03-01/Microsoft.Scheduler.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Scheduler",
+ "description": "Microsoft Scheduler Resource Types",
+ "resourceDefinitions": {
+ "jobCollections": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Scheduler/jobCollections"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-01"
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the job collection resource name."
+ },
+ "location": {
+ "type": "string",
+ "description": "Gets or sets the storage account location."
+ },
+ "tags": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the tags."
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobCollectionProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job collection properties."
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/jobCollections_jobs_childResource"
+ }
+ ]
+ }
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Scheduler/jobCollections"
+ },
+ "jobCollections_jobs": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Scheduler/jobCollections/jobs"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Scheduler/jobCollections/jobs"
+ }
+ },
+ "definitions": {
+ "HttpAuthentication": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "ClientCertificate",
+ "ActiveDirectoryOAuth",
+ "Basic"
+ ],
+ "description": "Gets or sets the http authentication type."
+ }
+ }
+ },
+ "HttpRequest": {
+ "type": "object",
+ "properties": {
+ "authentication": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HttpAuthentication"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the http authentication."
+ },
+ "uri": {
+ "type": "string",
+ "description": "Gets or sets the Uri."
+ },
+ "method": {
+ "type": "string",
+ "description": "Gets or sets the method of the request."
+ },
+ "body": {
+ "type": "string",
+ "description": "Gets or sets the request body."
+ },
+ "headers": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the headers."
+ }
+ }
+ },
+ "JobAction": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Http",
+ "Https",
+ "StorageQueue",
+ "ServiceBusQueue",
+ "ServiceBusTopic"
+ ],
+ "description": "Gets or sets the job action type."
+ },
+ "request": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HttpRequest"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the http requests."
+ },
+ "queueMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/StorageQueueMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the storage queue message."
+ },
+ "serviceBusQueueMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusQueueMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the service bus queue message."
+ },
+ "serviceBusTopicMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusTopicMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the service bus topic message."
+ },
+ "retryPolicy": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RetryPolicy"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the retry policy."
+ },
+ "errorAction": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobErrorAction"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the error action."
+ }
+ }
+ },
+ "JobCollectionProperties": {
+ "type": "object",
+ "properties": {
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Sku"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the SKU."
+ },
+ "state": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Enabled",
+ "Disabled",
+ "Suspended",
+ "Deleted"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the state."
+ },
+ "quota": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobCollectionQuota"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job collection quota."
+ }
+ }
+ },
+ "JobCollectionQuota": {
+ "type": "object",
+ "properties": {
+ "maxJobCount": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or set the maximum job count."
+ },
+ "maxJobOccurrence": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the maximum job occurrence."
+ },
+ "maxRecurrence": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobMaxRecurrence"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or set the maximum recurrence."
+ }
+ }
+ },
+ "jobCollections_jobs_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "jobs"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job properties."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Scheduler/jobCollections/jobs"
+ },
+ "JobErrorAction": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Http",
+ "Https",
+ "StorageQueue",
+ "ServiceBusQueue",
+ "ServiceBusTopic"
+ ],
+ "description": "Gets or sets the job error action type."
+ },
+ "request": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HttpRequest"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the http requests."
+ },
+ "queueMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/StorageQueueMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the storage queue message."
+ },
+ "serviceBusQueueMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusQueueMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the service bus queue message."
+ },
+ "serviceBusTopicMessage": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusTopicMessage"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the service bus topic message."
+ },
+ "retryPolicy": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RetryPolicy"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the retry policy."
+ }
+ }
+ },
+ "JobMaxRecurrence": {
+ "type": "object",
+ "properties": {
+ "frequency": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."
+ },
+ "interval": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the interval between retries."
+ }
+ }
+ },
+ "JobProperties": {
+ "type": "object",
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the job start time."
+ },
+ "action": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobAction"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job action."
+ },
+ "recurrence": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobRecurrence"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the job recurrence."
+ },
+ "state": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Enabled",
+ "Disabled",
+ "Faulted",
+ "Completed"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or set the job state."
+ }
+ }
+ },
+ "JobRecurrence": {
+ "type": "object",
+ "properties": {
+ "frequency": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month)."
+ },
+ "interval": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the interval between retries."
+ },
+ "count": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the maximum number of times that the job should run."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the time at which the job will complete."
+ },
+ "schedule": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/JobRecurrenceSchedule"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ }
+ },
+ "JobRecurrenceSchedule": {
+ "type": "object",
+ "properties": {
+ "weekDays": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ]
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the days of the week that the job should execute on."
+ },
+ "hours": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the hours of the day that the job should execute at."
+ },
+ "minutes": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the minutes of the hour that the job should execute at."
+ },
+ "monthDays": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the days of the month that the job should execute on. Must be between 1 and 31."
+ },
+ "monthlyOccurrences": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/JobRecurrenceScheduleMonthlyOccurrence"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the occurrences of days within a month."
+ }
+ }
+ },
+ "JobRecurrenceScheduleMonthlyOccurrence": {
+ "type": "object",
+ "properties": {
+ "day": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday."
+ },
+ "Occurrence": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the occurrence. Must be between -5 and 5."
+ }
+ }
+ },
+ "RetryPolicy": {
+ "type": "object",
+ "properties": {
+ "retryType": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "None",
+ "Fixed"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the retry strategy to be used."
+ },
+ "retryInterval": {
+ "type": "string",
+ "format": "duration",
+ "description": "Gets or sets the retry interval between retries."
+ },
+ "retryCount": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the number of times a retry should be attempted."
+ }
+ }
+ },
+ "ServiceBusAuthentication": {
+ "type": "object",
+ "properties": {
+ "sasKey": {
+ "type": "string",
+ "description": "Gets or sets the SAS key."
+ },
+ "sasKeyName": {
+ "type": "string",
+ "description": "Gets or sets the SAS key name."
+ },
+ "type": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "SharedAccessKey"
+ ],
+ "description": "Gets or sets the authentication type."
+ }
+ }
+ },
+ "ServiceBusBrokeredMessageProperties": {
+ "type": "object",
+ "properties": {
+ "contentType": {
+ "type": "string",
+ "description": "Gets or sets the content type."
+ },
+ "correlationId": {
+ "type": "string",
+ "description": "Gets or sets the correlation id."
+ },
+ "forcePersistence": {
+ "oneOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the force persistence."
+ },
+ "label": {
+ "type": "string",
+ "description": "Gets or sets the label."
+ },
+ "messageId": {
+ "type": "string",
+ "description": "Gets or sets the message id."
+ },
+ "partitionKey": {
+ "type": "string",
+ "description": "Gets or sets the partition key."
+ },
+ "replyTo": {
+ "type": "string",
+ "description": "Gets or sets the reply to."
+ },
+ "replyToSessionId": {
+ "type": "string",
+ "description": "Gets or sets the reply to session id."
+ },
+ "scheduledEnqueueTimeUtc": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the scheduled enqueue time UTC."
+ },
+ "sessionId": {
+ "type": "string",
+ "description": "Gets or sets the session id."
+ },
+ "timeToLive": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the time to live."
+ },
+ "to": {
+ "type": "string",
+ "description": "Gets or sets the to."
+ },
+ "viaPartitionKey": {
+ "type": "string",
+ "description": "Gets or sets the via partition key."
+ }
+ }
+ },
+ "ServiceBusQueueMessage": {
+ "type": "object",
+ "properties": {
+ "authentication": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusAuthentication"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the authentication."
+ },
+ "brokeredMessageProperties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusBrokeredMessageProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the brokered message properties."
+ },
+ "customMessageProperties": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the custom message properties."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the message."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace."
+ },
+ "transportType": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "NetMessaging",
+ "AMQP"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the transport type."
+ },
+ "queueName": {
+ "type": "string",
+ "description": "Gets or sets the queue name."
+ }
+ }
+ },
+ "ServiceBusTopicMessage": {
+ "type": "object",
+ "properties": {
+ "authentication": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusAuthentication"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the authentication."
+ },
+ "brokeredMessageProperties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ServiceBusBrokeredMessageProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the brokered message properties."
+ },
+ "customMessageProperties": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the custom message properties."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the message."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace."
+ },
+ "transportType": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "NetMessaging",
+ "AMQP"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the transport type."
+ },
+ "topicPath": {
+ "type": "string",
+ "description": "Gets or sets the topic path."
+ }
+ }
+ },
+ "Sku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "Standard",
+ "Free",
+ "P10Premium",
+ "P20Premium"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or set the SKU."
+ }
+ }
+ },
+ "StorageQueueMessage": {
+ "type": "object",
+ "properties": {
+ "storageAccount": {
+ "type": "string",
+ "description": "Gets or sets the storage account name."
+ },
+ "queueName": {
+ "type": "string",
+ "description": "Gets or sets the queue name."
+ },
+ "sasToken": {
+ "type": "string",
+ "description": "Gets or sets the SAS key."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the message."
+ }
+ }
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Search/2015-02-28/Microsoft.Search.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Search/2015-02-28/Microsoft.Search.json
new file mode 100644
index 000000000000..6bff8a75a3be
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Search/2015-02-28/Microsoft.Search.json
@@ -0,0 +1,123 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2015-02-28/Microsoft.Search.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Search",
+ "description": "Microsoft Search Resource Types",
+ "resourceDefinitions": {
+ "searchServices": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Search/searchServices"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-02-28"
+ ]
+ },
+ "location": {
+ "type": "string",
+ "description": "The geographic location of the Search service."
+ },
+ "tags": {
+ "oneOf": [
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Tags to help categorize the Search service in the Azure Portal."
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/SearchServiceProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Properties of the Search service."
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Search/searchServices"
+ }
+ },
+ "definitions": {
+ "SearchServiceProperties": {
+ "type": "object",
+ "properties": {
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Sku"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The SKU of the Search Service, which determines price tier and capacity limits."
+ },
+ "replicaCount": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The number of replicas in the Search service. If specified, it must be a value between 1 and 6 inclusive."
+ },
+ "partitionCount": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12."
+ }
+ },
+ "description": "Defines properties of an Azure Search service that can be modified."
+ },
+ "Sku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "free",
+ "standard",
+ "standard2"
+ ]
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The SKU of the Search service."
+ }
+ },
+ "description": "Defines the SKU of an Azure Search Service, which determines price tier and capacity limits."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-05-01-preview/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-05-01-preview/Microsoft.Storage.json
index 1ef130aa4b98..50565c4ddcb1 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-05-01-preview/Microsoft.Storage.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-05-01-preview/Microsoft.Storage.json
@@ -58,7 +58,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the account type. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'"
+ "description": "Gets or sets the account type."
}
}
}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-06-15/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-06-15/Microsoft.Storage.json
index c8793ab68b94..cac87b99d6d2 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-06-15/Microsoft.Storage.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2015-06-15/Microsoft.Storage.json
@@ -77,7 +77,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the account type. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'"
+ "description": "Gets or sets the account type."
}
},
"required": [
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json
index 031edc743f3a..9c330986a3ab 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json
@@ -43,7 +43,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Required. Indicates the type of storage account. Possible values include: 'Storage', 'BlobStorage'"
+ "description": "Required. Indicates the type of storage account."
},
"location": {
"type": "string",
@@ -197,7 +197,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Gets or sets the sku name. Required for account creation, optional for update. Note that in older versions, sku name was called accountType. Possible values include: 'Standard_LRS', 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS'"
+ "description": "Gets or sets the sku name. Required for account creation, optional for update. Note that in older versions, sku name was called accountType."
}
},
"required": [
@@ -243,7 +243,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Required for StandardBlob accounts. The access tier used for billing. Access tier cannot be changed more than once every 7 days (168 hours). Access tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types. Possible values include: 'Hot', 'Cool'"
+ "description": "Required for StandardBlob accounts. The access tier used for billing. Access tier cannot be changed more than once every 7 days (168 hours). Access tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types."
}
}
}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/TrafficManager/2015-11-01/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/TrafficManager/2015-11-01/Microsoft.Network.json
new file mode 100644
index 000000000000..8510ae7ed967
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/TrafficManager/2015-11-01/Microsoft.Network.json
@@ -0,0 +1,234 @@
+{
+ "id": "http://schema.management.azure.com/schemas/2015-11-01/Microsoft.Network.json#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "Microsoft.Network",
+ "description": "Microsoft Network Resource Types",
+ "resourceDefinitions": {
+ "trafficmanagerprofiles": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "Microsoft.Network/trafficmanagerprofiles"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-11-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ProfileProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/trafficmanagerprofiles"
+ }
+ },
+ "definitions": {
+ "DnsConfig": {
+ "type": "object",
+ "properties": {
+ "relativeName": {
+ "type": "string",
+ "description": "Gets or sets the relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the profile."
+ },
+ "fqdn": {
+ "type": "string",
+ "description": "Gets or sets the fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS domain used by Azure Traffic Manager."
+ },
+ "ttl": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the DNS Ttime-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile."
+ }
+ },
+ "description": "Class containing DNS settings in a Traffic Manager profile."
+ },
+ "Endpoint": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the Traffic Manager endpoint."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the Traffic Manager endpoint."
+ },
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the endpoint type of the Traffic Manager endpoint."
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/EndpointProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "description": "Class respresenting a Traffic Manager endpoint."
+ },
+ "EndpointProperties": {
+ "type": "object",
+ "properties": {
+ "targetResourceId": {
+ "type": "string",
+ "description": "Gets or sets the Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'."
+ },
+ "target": {
+ "type": "string",
+ "description": "Gets or sets the fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint."
+ },
+ "endpointStatus": {
+ "type": "string",
+ "description": "Gets or sets the status of the endpoint.. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values are 'Enabled' and 'Disabled'."
+ },
+ "weight": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000."
+ },
+ "priority": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value."
+ },
+ "endpointLocation": {
+ "type": "string",
+ "description": "Specifies the location of the external or nested endpoints when using the ‘Performance’ traffic routing method."
+ },
+ "endpointMonitorStatus": {
+ "type": "string",
+ "description": "Gets or sets the monitoring status of the endpoint."
+ },
+ "minChildEndpoints": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'."
+ }
+ },
+ "description": "Class respresenting a Traffic Manager endpoint properties."
+ },
+ "MonitorConfig": {
+ "type": "object",
+ "properties": {
+ "profileMonitorStatus": {
+ "type": "string",
+ "description": "Gets or sets the profile-level monitoring status of the Traffic Manager profile."
+ },
+ "protocol": {
+ "type": "string",
+ "description": "Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint health."
+ },
+ "port": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the TCP port used to probe for endpoint health."
+ },
+ "path": {
+ "type": "string",
+ "description": "Gets or sets the path relative to the endpoint domain name used to probe for endpoint health."
+ }
+ },
+ "description": "Class containing endpoint monitoring settings in a Traffic Manager profile."
+ },
+ "ProfileProperties": {
+ "type": "object",
+ "properties": {
+ "profileStatus": {
+ "type": "string",
+ "description": "Gets or sets the status of the Traffic Manager profile. Possible values are 'Enabled' and 'Disabled'."
+ },
+ "trafficRoutingMethod": {
+ "type": "string",
+ "description": "Gets or sets the traffic routing method of the Traffic Manager profile. Possible values are 'Performance', 'Weighted', or 'Priority'."
+ },
+ "dnsConfig": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/DnsConfig"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the DNS settings of the Traffic Manager profile."
+ },
+ "monitorConfig": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/MonitorConfig"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the endpoint monitoring settings of the Traffic Manager profile."
+ },
+ "endpoints": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Endpoint"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "Gets or sets the list of endpoints in the Traffic Manager profile."
+ }
+ },
+ "description": "Class representing the Traffic Manager profile properties."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json
index 817bd6cae429..e6bfcb2198be 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json
@@ -28,16 +28,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/certificateOrders_certificates_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/certificateOrders_certificates_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -245,7 +245,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'"
+ "description": "Certificate product type."
},
"autoRenew": {
"oneOf": [
@@ -274,7 +274,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Status of certificate order. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'"
+ "description": "Status of certificate order."
},
"status": {
"oneOf": [
@@ -297,7 +297,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'"
+ "description": "Current order status."
},
"signedCertificate": {
"oneOf": [
@@ -437,7 +437,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Status of the Key Vault secret. Possible values include: 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'Unknown'"
+ "description": "Status of the Key Vault secret."
}
}
},
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json
index 82fe9dbd7002..e78afb603913 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json
@@ -197,7 +197,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Domain registration status. Possible values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed'"
+ "description": "Domain registration status."
},
"provisioningState": {
"oneOf": [
@@ -215,7 +215,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Domain provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'"
+ "description": "Domain provisioning state."
},
"nameServers": {
"oneOf": [
@@ -307,17 +307,21 @@
"domainNotRenewableReasons": {
"oneOf": [
{
- "type": "string",
- "enum": [
- "RegistrationStatusNotSupportedForRenewal",
- "ExpirationNotInRenewalTimeRange",
- "SubscriptionNotActive"
- ]
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "RegistrationStatusNotSupportedForRenewal",
+ "ExpirationNotInRenewalTimeRange",
+ "SubscriptionNotActive"
+ ]
+ }
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "Reasons why domain is not renewable"
}
}
},
@@ -388,7 +392,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager'"
+ "description": "Type of the Azure resource the hostname is assigned to."
},
"customHostNameDnsRecordType": {
"oneOf": [
@@ -403,7 +407,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Type of the Dns record. Possible values include: 'CName', 'A'"
+ "description": "Type of the Dns record."
},
"hostNameType": {
"oneOf": [
@@ -418,7 +422,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Type of the hostname. Possible values include: 'Verified', 'Managed'"
+ "description": "Type of the hostname."
}
},
"description": "Details of a hostname derived from a domain"
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json
index dd8b1d46ccab..803dc83a8a85 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json
@@ -94,16 +94,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/hostingEnvironments_workerPools_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/hostingEnvironments_workerPools_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -322,28 +322,28 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_hybridconnection_childResource"
- },
- {
- "$ref": "#/definitions/sites_hostNameBindings_childResource"
- },
- {
- "$ref": "#/definitions/sites_deployments_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_childResource"
- },
- {
- "$ref": "#/definitions/sites_virtualNetworkConnections_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_hybridconnection_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_hostNameBindings_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_deployments_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_virtualNetworkConnections_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -509,25 +509,25 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_slots_hybridconnection_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_hostNameBindings_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_deployments_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_virtualNetworkConnections_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_slots_hybridconnection_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_hostNameBindings_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_deployments_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_virtualNetworkConnections_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -693,16 +693,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_slots_virtualNetworkConnections_gateways_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_slots_virtualNetworkConnections_gateways_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -769,16 +769,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_virtualNetworkConnections_gateways_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_virtualNetworkConnections_gateways_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -850,7 +850,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "ActionType - predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'"
+ "description": "ActionType - predefined action to be taken."
},
"customAction": {
"oneOf": [
@@ -1162,7 +1162,7 @@
"SQLAzure",
"Custom"
],
- "description": "Type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom'"
+ "description": "Type of database."
}
},
"required": [
@@ -1349,7 +1349,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Provisioning state of the hostingEnvironment (App Service Environment). Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting'"
+ "description": "Provisioning state of the hostingEnvironment (App Service Environment)."
},
"status": {
"oneOf": [
@@ -1366,7 +1366,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Current status of the hostingEnvironment (App Service Environment). Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'"
+ "description": "Current status of the hostingEnvironment (App Service Environment)."
},
"vnetName": {
"type": "string",
@@ -1405,7 +1405,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Specifies which endpoints to serve internally in the hostingEnvironment's (App Service Environment) VNET. Possible values include: 'None', 'Web', 'Publishing'"
+ "description": "Specifies which endpoints to serve internally in the hostingEnvironment's (App Service Environment) VNET."
},
"multiSize": {
"type": "string",
@@ -1686,7 +1686,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Azure resource type. Possible values include: 'Website', 'TrafficManager'"
+ "description": "Azure resource type."
},
"customHostNameDnsRecordType": {
"oneOf": [
@@ -1701,7 +1701,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Custom DNS record type. Possible values include: 'CName', 'A'"
+ "description": "Custom DNS record type."
},
"hostNameType": {
"oneOf": [
@@ -1716,7 +1716,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Host name type. Possible values include: 'Verified', 'Managed'"
+ "description": "Host name type."
}
}
},
@@ -1741,7 +1741,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled'"
+ "description": "SSL type."
},
"virtualIP": {
"type": "string",
@@ -1811,8 +1811,7 @@
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ],
- "description": "Possible values include: 'Permit', 'Deny'"
+ ]
},
"description": {
"type": "string"
@@ -2441,7 +2440,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Managed pipeline mode. Possible values include: 'Integrated', 'Classic'"
+ "description": "Managed pipeline mode."
},
"virtualApplications": {
"oneOf": [
@@ -2473,7 +2472,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'"
+ "description": "Site load balancing."
},
"experiments": {
"oneOf": [
@@ -2742,22 +2741,22 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_slots_hybridconnection_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_hostNameBindings_childResource"
- },
- {
- "$ref": "#/definitions/sites_slots_deployments_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_slots_hybridconnection_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_hostNameBindings_childResource"
+ },
+ {
+ "$ref": "#/definitions/sites_slots_deployments_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -2890,16 +2889,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_slots_virtualNetworkConnections_gateways_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_slots_virtualNetworkConnections_gateways_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -2966,16 +2965,16 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/sites_virtualNetworkConnections_gateways_childResource"
- }
- ]
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/sites_virtualNetworkConnections_gateways_childResource"
+ }
+ ]
+ }
}
},
"required": [
@@ -3123,7 +3122,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Shared/Dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic'"
+ "description": "Shared/Dedicated workers."
},
"workerSize": {
"oneOf": [
@@ -3140,7 +3139,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Size of the machines. Possible values include: 'Default', 'Small', 'Medium', 'Large'"
+ "description": "Size of the machines."
},
"workerSizeId": {
"oneOf": [
@@ -3570,7 +3569,7 @@
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Shared or dedicated web app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic'"
+ "description": "Shared or dedicated web app hosting."
},
"workerSize": {
"type": "string",
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
index cb5c18ebb77d..2bbbdd0f79af 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
@@ -3,7 +3,6 @@
using Microsoft.Rest.Generator.AzureResourceSchema;
using Microsoft.Rest.Generator.ClientModel;
-using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
@@ -12,26 +11,13 @@ namespace AutoRest.Generator.AzureResourceSchema.Tests
{
public class ResourceSchemaParserTests
{
- [Fact]
- public void ParseWithNullServiceClient()
- {
- Assert.Throws(() => { ResourceSchemaParser.Parse(null); });
- }
-
- [Fact]
- public void ParseWithEmptyServiceClient()
- {
- ServiceClient serviceClient = new ServiceClient();
- IDictionary schemas = ResourceSchemaParser.Parse(serviceClient);
- Assert.NotNull(schemas);
- Assert.Equal(0, schemas.Count);
- }
-
[Fact]
public void ParseWithServiceClientWithCreateResourceMethod()
{
ServiceClient serviceClient = new ServiceClient();
+ serviceClient.ApiVersion = "2016-01-01";
+
Parameter body = new Parameter()
{
Location = ParameterLocation.Body,
@@ -43,7 +29,13 @@ public void ParseWithServiceClientWithCreateResourceMethod()
const string url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Mock.Provider/mockResourceNames/{mockResourceName}";
- Method method = CreateMethod(body: body, responseBody: responseBody, url: url);
+ Method method = new Method()
+ {
+ HttpMethod = HttpMethod.Put,
+ ReturnType = new Response(responseBody, null),
+ Url = url,
+ };
+ method.Parameters.Add(body);
serviceClient.Methods.Add(method);
@@ -52,7 +44,7 @@ public void ParseWithServiceClientWithCreateResourceMethod()
Assert.Equal(1, schemas.Count);
ResourceSchema schema = schemas["Mock.Provider"];
- Assert.Null(schema.Id);
+ Assert.Equal("http://schema.management.azure.com/schemas/2016-01-01/Mock.Provider.json#", schema.Id);
Assert.Equal("http://json-schema.org/draft-04/schema#", schema.Schema);
Assert.Equal("Mock.Provider", schema.Title);
Assert.Equal("Mock Provider Resource Types", schema.Description);
@@ -64,241 +56,11 @@ public void ParseWithServiceClientWithCreateResourceMethod()
JsonType = "object",
Description = "Mock.Provider/mockResourceNames"
}
- .AddProperty("type", new JsonSchema()
- {
- JsonType = "string"
- }
- .AddEnum("Mock.Provider/mockResourceNames"),
- true),
+ .AddProperty("type", JsonSchema.CreateStringEnum("Mock.Provider/mockResourceNames"), true)
+ .AddProperty("apiVersion", JsonSchema.CreateStringEnum("2016-01-01"), true),
schema.ResourceDefinitions["mockResourceNames"]);
Assert.NotNull(schema.Definitions);
Assert.Equal(0, schema.Definitions.Count);
}
-
- [Fact]
- public void IsCreateResourceMethodWithNullMethod()
- {
- Assert.Throws(() => { ResourceSchemaParser.IsCreateResourceMethod(null); });
- }
-
- [Fact]
- public void IsCreateResourceMethodWithGetHttpMethod()
- {
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(HttpMethod.Get)));
- }
-
- [Fact]
- public void IsCreateResourceMethodWithNoBody()
- {
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod()));
- }
-
- [Fact]
- public void IsCreateResourceMethodNoReturnType()
- {
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(body: new Parameter()
- {
- Location = ParameterLocation.Body
- })));
- }
-
- [Fact]
- public void IsCreateResourceMethodWithNonResourceReturnType()
- {
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(
- body: new Parameter()
- {
- Location = ParameterLocation.Body
- },
- responseBody: new PrimaryType(KnownPrimaryType.Int))));
- }
-
- [Fact]
- public void IsCreateResourceMethodWithCompositeNonResourceReturnType()
- {
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(
- body: new Parameter()
- {
- Location = ParameterLocation.Body
- },
- responseBody: new CompositeType())));
- }
-
- [Fact]
- public void IsCreateResourceMethodWithResourceReturnTypeButNoUrl()
- {
- CompositeType responseBody = new CompositeType();
- responseBody.Extensions.Add("x-ms-azure-resource", true);
-
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(
- body: new Parameter()
- {
- Location = ParameterLocation.Body
- },
- responseBody: responseBody)));
- }
-
-
-
- [Fact]
- public void IsCreateResourceMethodWithResourceReturnTypeAndUrl()
- {
- CompositeType responseBody = new CompositeType();
- responseBody.Extensions.Add("x-ms-azure-resource", true);
-
- Assert.True(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(
- body: new Parameter()
- {
- Location = ParameterLocation.Body
- },
- responseBody: responseBody,
- url: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Mock.Provider/mockResourceNames/{mockResourceName}")));
- }
-
- [Fact]
- public void IsCreateResourceMethodWhenUrlDoesntEndWithResourceNamePlaceholder()
- {
- CompositeType responseBody = new CompositeType();
- responseBody.Extensions.Add("x-ms-azure-resource", true);
-
- Assert.False(ResourceSchemaParser.IsCreateResourceMethod(CreateMethod(
- body: new Parameter()
- {
- Location = ParameterLocation.Body
- },
- responseBody: responseBody,
- url: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames")));
- }
-
- [Fact]
- public void GetResourceTypesWithOneLevelOfResources()
- {
- Assert.Equal(new string[] { "Microsoft.Cdn/profiles" }, ResourceSchemaParser.GetResourceTypes("Microsoft.Cdn", "profiles/{profileName}", new List()));
- }
-
- [Fact]
- public void GetResourceTypesWithMultipleLevelsOfResources()
- {
- Assert.Equal(new string[] { "Microsoft.Cdn/profiles/endpoints/customDomains" }, ResourceSchemaParser.GetResourceTypes("Microsoft.Cdn", "profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}", new List()));
- }
-
- [Fact]
- public void GetResourceTypesParameterReferenceWithNoMatchingParameterDefinition()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- List methodParameters = new List();
- Assert.Throws(() => { ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters); });
- }
-
- [Fact]
- public void GetResourceTypesWithParameterReferenceWithParameterDefinitionWithNoType()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- List methodParameters = new List()
- {
- new Parameter()
- {
- Name = "recordType"
- }
- };
- Assert.Throws(() => { ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters); });
- }
-
- [Fact]
- public void GetResourceTypesWithParameterReferenceWithParameterDefinitionWithPrimaryType()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- List methodParameters = new List()
- {
- new Parameter()
- {
- Name = "recordType",
- Type = new PrimaryType(KnownPrimaryType.String)
- }
- };
- Assert.Throws(() => { ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters); });
- }
-
- [Fact]
- public void GetResourceTypesWithParameterReferenceWithParameterDefinitionWithEnumTypeWithNoValues()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- List methodParameters = new List()
- {
- new Parameter()
- {
- Name = "recordType",
- Type = new EnumType()
- }
- };
- Assert.Throws(() => { ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters); });
- }
-
- [Fact]
- public void GetResourceTypesWithParameterReferenceWithParameterDefinitionWithEnumTypeWithOneValue()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- EnumType enumType = new EnumType();
- enumType.Values.Add(new EnumValue()
- {
- Name = "A"
- });
- List methodParameters = new List()
- {
- new Parameter()
- {
- Name = "recordType",
- Type = enumType
- }
- };
- Assert.Equal(new string[] { "Microsoft.Network/dnszones/A" }, ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters));
- }
-
- [Fact]
- public void GetResourceTypesWithParameterReferenceWithParameterDefinitionWithEnumTypeWithMultipleValues()
- {
- const string provider = "Microsoft.Network";
- const string pathAfterProvider = "dnszones/{zoneName}/{recordType}/{relativeRecordSetName}";
- EnumType enumType = new EnumType();
- enumType.Values.Add(new EnumValue() { Name = "A" });
- enumType.Values.Add(new EnumValue() { Name = "AAAA" });
- enumType.Values.Add(new EnumValue() { Name = "CNAME" });
- enumType.Values.Add(new EnumValue() { Name = "MX" });
- List methodParameters = new List()
- {
- new Parameter()
- {
- Name = "recordType",
- Type = enumType
- }
- };
- Assert.Equal(
- new string[]
- {
- "Microsoft.Network/dnszones/A",
- "Microsoft.Network/dnszones/AAAA",
- "Microsoft.Network/dnszones/CNAME",
- "Microsoft.Network/dnszones/MX"
- },
- ResourceSchemaParser.GetResourceTypes(provider, pathAfterProvider, methodParameters));
- }
-
- private static Method CreateMethod(HttpMethod httpMethod = HttpMethod.Put, Parameter body = null, IType responseBody = null, string url = null)
- {
- Method method = new Method()
- {
- HttpMethod = httpMethod,
- ReturnType = new Response(responseBody, null),
- Url = url,
- };
- method.Parameters.Add(body);
-
- return method;
- }
}
}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs
index 9c52439cfdb1..5a9fd7ebccb5 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaWriterTests.cs
@@ -167,14 +167,10 @@ public void WriteDefinitionWithTypeAndEnum()
writer.QuoteChar = '\'';
const string definitionName = "mockDefinition";
- JsonSchema definition = new JsonSchema()
- {
- JsonType = "MockType"
- }
- .AddEnum("MockEnum1", "MockEnum2");
+ JsonSchema definition = JsonSchema.CreateStringEnum("MockEnum1", "MockEnum2");
ResourceSchemaWriter.WriteDefinition(writer, definitionName, definition);
- Assert.Equal("'mockDefinition':{'type':'MockType','enum':['MockEnum1','MockEnum2']}", stringWriter.ToString());
+ Assert.Equal("'mockDefinition':{'type':'string','enum':['MockEnum1','MockEnum2']}", stringWriter.ToString());
}
[Fact]
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Logic/2015-02-01-preview/logic.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Logic/2015-02-01-preview/logic.json
new file mode 100644
index 000000000000..a3ad968afaed
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Logic/2015-02-01-preview/logic.json
@@ -0,0 +1,2375 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "LogicManagementClient",
+ "version": "2015-02-01-preview"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows": {
+ "get": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_ListBySubscription",
+ "description": "Gets a list of workflows by subscription.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the operation.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/WorkflowFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows": {
+ "get": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_ListByResourceGroup",
+ "description": "Gets a list of workflows by resource group.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the operation.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/WorkflowFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}": {
+ "get": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Get",
+ "description": "Gets a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_CreateOrUpdate",
+ "description": "Creates or updates a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "workflow",
+ "description": "The workflow.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ },
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Update",
+ "description": "Updates a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "workflow",
+ "description": "The workflow.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Delete",
+ "description": "Deletes a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ },
+ "204": {
+ "description": "No Content"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/run": {
+ "post": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Run",
+ "description": "Runs a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "parameters",
+ "description": "The parameters.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/RunWorkflowParameters"
+ }
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": "Accepted",
+ "schema": {
+ "$ref": "#/definitions/WorkflowRun"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable": {
+ "post": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Disable",
+ "description": "Disables a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable": {
+ "post": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Enable",
+ "description": "Enables a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate": {
+ "post": {
+ "tags": [
+ "Workflows"
+ ],
+ "operationId": "Workflows_Validate",
+ "description": "Validates a workflow.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "workflow",
+ "description": "The workflow.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Workflow"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}": {
+ "get": {
+ "tags": [
+ "WorkflowVersions"
+ ],
+ "operationId": "WorkflowVersions_Get",
+ "description": "Gets a workflow version.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "versionId",
+ "description": "The workflow versionId.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowVersion"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys": {
+ "get": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_List",
+ "description": "Gets a list of workflow access keys.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowAccessKeyListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys/{accessKeyName}": {
+ "get": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_Get",
+ "description": "Gets a workflow access key.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessKeyName",
+ "description": "The workflow access key name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowAccessKey"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_CreateOrUpdate",
+ "description": "Creates or updates a workflow access key.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessKeyName",
+ "description": "The workflow access key name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "workflowAccesskey",
+ "description": "The workflow access key.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/WorkflowAccessKey"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowAccessKey"
+ }
+ },
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/WorkflowAccessKey"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_Delete",
+ "description": "Deletes a workflow access key.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessKeyName",
+ "description": "The workflow access key name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ },
+ "204": {
+ "description": "No Content"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys/{accessKeyName}/list": {
+ "post": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_ListSecretKeys",
+ "description": "Lists secret keys.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessKeyName",
+ "description": "The workflow access key name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowSecretKeys"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/accessKeys/{accessKeyName}/regenerate": {
+ "post": {
+ "tags": [
+ "WorkflowAccessKeys"
+ ],
+ "operationId": "WorkflowAccessKeys_RegenerateSecretKey",
+ "description": "Regenerates secret key.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessKeyName",
+ "description": "The workflow access key name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "parameters",
+ "description": "The parameters.",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/RegenerateSecretKeyParameters"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowSecretKeys"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/": {
+ "get": {
+ "tags": [
+ "WorkflowTriggers"
+ ],
+ "operationId": "WorkflowTriggers_List",
+ "description": "Gets a list of workflow triggers.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the operation.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowTriggerListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/WorkflowTriggerFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}": {
+ "get": {
+ "tags": [
+ "WorkflowTriggers"
+ ],
+ "operationId": "WorkflowTriggers_Get",
+ "description": "Gets a workflow trigger.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "triggerName",
+ "description": "The workflow trigger name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowTrigger"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run": {
+ "post": {
+ "tags": [
+ "WorkflowTriggers"
+ ],
+ "operationId": "WorkflowTriggers_Run",
+ "description": "Runs a workflow trigger.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "triggerName",
+ "description": "The workflow trigger name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories": {
+ "get": {
+ "tags": [
+ "WorkflowTriggerHistories"
+ ],
+ "operationId": "WorkflowTriggerHistories_List",
+ "description": "Gets a list of workflow trigger histories.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "triggerName",
+ "description": "The workflow trigger name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowTriggerHistoryListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}": {
+ "get": {
+ "tags": [
+ "WorkflowTriggerHistories"
+ ],
+ "operationId": "WorkflowTriggerHistories_Get",
+ "description": "Gets a workflow trigger history.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "triggerName",
+ "description": "The workflow trigger name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "historyName",
+ "description": "The workflow trigger history name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowTriggerHistory"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs": {
+ "get": {
+ "tags": [
+ "WorkflowRuns"
+ ],
+ "operationId": "WorkflowRuns_List",
+ "description": "Gets a list of workflow runs.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the operation.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowRunListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/WorkflowRunFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}": {
+ "get": {
+ "tags": [
+ "WorkflowRuns"
+ ],
+ "operationId": "WorkflowRuns_Get",
+ "description": "Gets a workflow run.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "runName",
+ "description": "The workflow run name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowRun"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel": {
+ "post": {
+ "tags": [
+ "WorkflowRuns"
+ ],
+ "operationId": "WorkflowRuns_Cancel",
+ "description": "Cancels a workflow run.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "runName",
+ "description": "The workflow run name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions": {
+ "get": {
+ "tags": [
+ "WorkflowRunActions"
+ ],
+ "operationId": "WorkflowRunActions_List",
+ "description": "Gets a list of workflow run actions.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "runName",
+ "description": "The workflow run name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ },
+ {
+ "name": "$top",
+ "description": "The number of items to be included in the result.",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the operation.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowRunActionListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/WorkflowRunActionFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}": {
+ "get": {
+ "tags": [
+ "WorkflowRunActions"
+ ],
+ "operationId": "WorkflowRunActions_Get",
+ "description": "Gets a workflow run action.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "The resource group name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workflowName",
+ "description": "The workflow name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "runName",
+ "description": "The workflow run name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "actionName",
+ "description": "The workflow action name.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/api-version"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WorkflowRunAction"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "Resource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the resource id."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets the resource name."
+ },
+ "type": {
+ "type": "string",
+ "description": "Gets the resource type."
+ },
+ "location": {
+ "type": "string",
+ "description": "Gets or sets the resource location."
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the resource tags."
+ }
+ },
+ "x-ms-azure-resource": true
+ },
+ "SubResource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the resource id."
+ }
+ },
+ "x-ms-azure-resource": true
+ },
+ "Object": {
+ "type": "object",
+ "properties": {}
+ },
+ "ResourceReference": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the resource id."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the resource name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the resource type."
+ }
+ }
+ },
+ "Workflow": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowProperties",
+ "description": "Gets or sets the workflow properties."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ]
+ },
+ "WorkflowProperties": {
+ "type": "object",
+ "properties": {
+ "provisioningState": {
+ "$ref": "#/definitions/WorkflowProvisioningState",
+ "readOnly": true,
+ "description": "Gets the provisioning state."
+ },
+ "createdTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the created time."
+ },
+ "changedTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the changed time."
+ },
+ "state": {
+ "$ref": "#/definitions/WorkflowState",
+ "description": "Gets or sets the state."
+ },
+ "version": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the version."
+ },
+ "accessEndpoint": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the access endpoint."
+ },
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "Gets or sets the sku."
+ },
+ "definitionLink": {
+ "$ref": "#/definitions/ContentLink",
+ "description": "Gets or sets the link to definition."
+ },
+ "definition": {
+ "$ref": "#/definitions/Object",
+ "description": "Gets or sets the definition."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ContentLink",
+ "description": "Gets or sets the link to parameters."
+ },
+ "parameters": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/WorkflowParameter"
+ },
+ "description": "Gets or sets the parameters."
+ }
+ }
+ },
+ "WorkflowFilter": {
+ "type": "object",
+ "properties": {
+ "state": {
+ "$ref": "#/definitions/WorkflowState",
+ "description": "Gets or sets the state of workflows."
+ }
+ }
+ },
+ "WorkflowListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Workflow"
+ },
+ "description": "Gets or sets the list of workflows."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "WorkflowVersion": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowVersionProperties",
+ "description": "Gets or sets the workflow version properties."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ]
+ },
+ "WorkflowVersionProperties": {
+ "type": "object",
+ "properties": {
+ "createdTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the created time."
+ },
+ "changedTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the changed time."
+ },
+ "state": {
+ "$ref": "#/definitions/WorkflowState",
+ "description": "Gets or sets the state."
+ },
+ "version": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the version."
+ },
+ "accessEndpoint": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the access endpoint."
+ },
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "Gets or sets the sku."
+ },
+ "definitionLink": {
+ "$ref": "#/definitions/ContentLink",
+ "description": "Gets or sets the link to definition."
+ },
+ "definition": {
+ "$ref": "#/definitions/Object",
+ "description": "Gets or sets the definition."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ContentLink",
+ "description": "Gets or sets the link to parameters."
+ },
+ "parameters": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/WorkflowParameter"
+ },
+ "description": "Gets or sets the parameters."
+ }
+ }
+ },
+ "WorkflowAccessKey": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowAccessKeyProperties",
+ "description": "Gets or sets the workflow access key properties."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow access key name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow access key type."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/SubResource"
+ }
+ ]
+ },
+ "WorkflowAccessKeyProperties": {
+ "type": "object",
+ "properties": {
+ "notBefore": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the not-before time."
+ },
+ "notAfter": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the not-after time."
+ }
+ }
+ },
+ "WorkflowAccessKeyListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkflowAccessKey"
+ },
+ "description": "Gets or sets a list of workflow access keys."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "WorkflowTrigger": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowTriggerProperties",
+ "description": "Gets or sets the workflow trigger properties."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow trigger name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow trigger type."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/SubResource"
+ }
+ ]
+ },
+ "WorkflowTriggerProperties": {
+ "type": "object",
+ "properties": {
+ "provisioningState": {
+ "$ref": "#/definitions/WorkflowTriggerProvisioningState",
+ "readOnly": true,
+ "description": "Gets the provisioning state."
+ },
+ "createdTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the created time."
+ },
+ "changedTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the changed time."
+ },
+ "state": {
+ "$ref": "#/definitions/WorkflowState",
+ "readOnly": true,
+ "description": "Gets the state."
+ },
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "readOnly": true,
+ "description": "Gets the status."
+ },
+ "lastExecutionTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the last execution time."
+ },
+ "nextExecutionTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the next execution time."
+ },
+ "recurrence": {
+ "$ref": "#/definitions/WorkflowTriggerRecurrence",
+ "readOnly": true,
+ "description": "Gets the workflow trigger recurrence."
+ },
+ "workflow": {
+ "$ref": "#/definitions/ResourceReference",
+ "readOnly": true,
+ "description": "Gets the reference to workflow."
+ }
+ }
+ },
+ "WorkflowTriggerFilter": {
+ "type": "object",
+ "properties": {
+ "state": {
+ "$ref": "#/definitions/WorkflowState",
+ "description": "Gets or sets the state of workflow trigger."
+ }
+ }
+ },
+ "WorkflowTriggerListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkflowTrigger"
+ },
+ "description": "Gets or sets a list of workflow triggers."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "WorkflowTriggerHistory": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowTriggerHistoryProperties",
+ "description": "Gets the workflow trigger history properties."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow trigger history name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow trigger history type."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/SubResource"
+ }
+ ]
+ },
+ "WorkflowTriggerHistoryProperties": {
+ "type": "object",
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the start time."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the end time."
+ },
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "readOnly": true,
+ "description": "Gets the status."
+ },
+ "code": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the code."
+ },
+ "error": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the error."
+ },
+ "trackingId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the tracking id."
+ },
+ "inputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to input parameters."
+ },
+ "outputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to output parameters."
+ },
+ "fired": {
+ "type": "boolean",
+ "readOnly": true,
+ "description": "Gets a value indicating whether trigger was fired."
+ },
+ "run": {
+ "$ref": "#/definitions/ResourceReference",
+ "readOnly": true,
+ "description": "Gets the reference to workflow run."
+ }
+ }
+ },
+ "WorkflowTriggerHistoryListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkflowTriggerHistory"
+ },
+ "description": "Gets or sets a list of workflow trigger histories."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "WorkflowRun": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowRunProperties",
+ "description": "Gets or sets the workflow run properties."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow run name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow run type."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/SubResource"
+ }
+ ]
+ },
+ "WorkflowRunProperties": {
+ "type": "object",
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the start time."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the end time."
+ },
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "readOnly": true,
+ "description": "Gets the status."
+ },
+ "code": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the code."
+ },
+ "error": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the error."
+ },
+ "correlationId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the correlation id."
+ },
+ "workflow": {
+ "$ref": "#/definitions/ResourceReference",
+ "readOnly": true,
+ "description": "Gets the reference to workflow version."
+ },
+ "trigger": {
+ "$ref": "#/definitions/WorkflowRunTrigger",
+ "readOnly": true,
+ "description": "Gets the fired trigger."
+ },
+ "outputs": {
+ "type": "object",
+ "readOnly": true,
+ "additionalProperties": {
+ "$ref": "#/definitions/WorkflowOutputParameter"
+ },
+ "description": "Gets the outputs."
+ }
+ }
+ },
+ "WorkflowRunFilter": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "description": "Gets or sets the status of workflow run."
+ }
+ }
+ },
+ "WorkflowRunListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkflowRun"
+ },
+ "description": "Gets or sets a list of workflow runs."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "WorkflowRunAction": {
+ "type": "object",
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/WorkflowRunActionProperties",
+ "description": "Gets or sets the workflow run action properties."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow run action name."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the workflow run action type."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/SubResource"
+ }
+ ]
+ },
+ "WorkflowRunActionProperties": {
+ "type": "object",
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the start time."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the end time."
+ },
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "readOnly": true,
+ "description": "Gets the status."
+ },
+ "code": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the code."
+ },
+ "error": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the error."
+ },
+ "trackingId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the trackingId."
+ },
+ "inputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to inputs."
+ },
+ "outputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to outputs."
+ }
+ }
+ },
+ "WorkflowRunActionFilter": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "description": "Gets or sets the status of workflow run action."
+ }
+ }
+ },
+ "WorkflowRunActionListResult": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkflowRunAction"
+ },
+ "description": "Gets or sets a list of workflow run actions."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ }
+ },
+ "SkuName": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Free",
+ "Shared",
+ "Basic",
+ "Standard",
+ "Premium"
+ ],
+ "x-ms-enum": {
+ "name": "SkuName",
+ "modelAsString": false
+ }
+ },
+ "WorkflowState": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Enabled",
+ "Disabled",
+ "Deleted",
+ "Suspended"
+ ],
+ "x-ms-enum": {
+ "name": "WorkflowState",
+ "modelAsString": false
+ }
+ },
+ "WorkflowStatus": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Paused",
+ "Running",
+ "Waiting",
+ "Succeeded",
+ "Skipped",
+ "Suspended",
+ "Cancelled",
+ "Failed",
+ "Faulted",
+ "TimedOut",
+ "Aborted"
+ ],
+ "x-ms-enum": {
+ "name": "WorkflowStatus",
+ "modelAsString": false
+ }
+ },
+ "ParameterType": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "String",
+ "SecureString",
+ "Int",
+ "Float",
+ "Bool",
+ "Array",
+ "Object",
+ "SecureObject"
+ ],
+ "x-ms-enum": {
+ "name": "ParameterType",
+ "modelAsString": false
+ }
+ },
+ "KeyType": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Primary",
+ "Secondary"
+ ],
+ "x-ms-enum": {
+ "name": "KeyType",
+ "modelAsString": false
+ }
+ },
+ "Sku": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/definitions/SkuName",
+ "description": "Gets or sets the name."
+ },
+ "plan": {
+ "$ref": "#/definitions/ResourceReference",
+ "description": "Gets or sets the reference to plan."
+ }
+ }
+ },
+ "ContentLink": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "Gets or sets the content link URI."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "Gets or sets the content version."
+ },
+ "contentSize": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the content size."
+ },
+ "contentHash": {
+ "$ref": "#/definitions/ContentHash",
+ "description": "Gets or sets the content hash."
+ },
+ "metadata": {
+ "$ref": "#/definitions/Object",
+ "description": "Gets or sets the metadata."
+ }
+ }
+ },
+ "ContentHash": {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "type": "string",
+ "description": "Gets or sets the algorithm."
+ },
+ "value": {
+ "type": "string",
+ "description": "Gets or sets the value."
+ }
+ }
+ },
+ "WorkflowParameter": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "$ref": "#/definitions/ParameterType",
+ "description": "Gets or sets the type."
+ },
+ "value": {
+ "$ref": "#/definitions/Object",
+ "description": "Gets or sets the value."
+ },
+ "metadata": {
+ "$ref": "#/definitions/Object",
+ "description": "Gets or sets the metadata."
+ }
+ }
+ },
+ "WorkflowOutputParameter": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the error."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "WorkflowParameter"
+ }
+ ]
+ },
+ "RegenerateSecretKeyParameters": {
+ "type": "object",
+ "properties": {
+ "keyType": {
+ "$ref": "#/definitions/KeyType",
+ "description": "Gets or sets the key type."
+ }
+ }
+ },
+ "RunWorkflowParameters": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of workflow run trigger."
+ },
+ "outputs": {
+ "type": "object",
+ "description": "Gets or sets the outputs of workflow run trigger."
+ }
+ }
+ },
+ "WorkflowSecretKeys": {
+ "type": "object",
+ "properties": {
+ "primarySecretKey": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the primary secret key."
+ },
+ "secondarySecretKey": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the secondary secret key."
+ }
+ }
+ },
+ "RecurrenceFrequency": {
+ "type": "string",
+ "enum": [
+ "Second",
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month",
+ "Year"
+ ],
+ "x-ms-enum": {
+ "name": "RecurrenceFrequency",
+ "modelAsString": false
+ }
+ },
+ "WorkflowTriggerRecurrence": {
+ "type": "object",
+ "properties": {
+ "frequency": {
+ "$ref": "#/definitions/RecurrenceFrequency",
+ "description": "Gets or sets the frequency."
+ },
+ "interval": {
+ "type": "integer",
+ "format": "int32",
+ "description": "Gets or sets the interval."
+ },
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the start time."
+ },
+ "timeZone": {
+ "type": "string",
+ "description": "Gets or sets the time zone."
+ }
+ }
+ },
+ "WorkflowRunTrigger": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the name."
+ },
+ "inputs": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the inputs."
+ },
+ "inputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to inputs."
+ },
+ "outputs": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the outputs."
+ },
+ "outputsLink": {
+ "$ref": "#/definitions/ContentLink",
+ "readOnly": true,
+ "description": "Gets the link to outputs."
+ },
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the start time."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the end time."
+ },
+ "trackingId": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the trackingId."
+ },
+ "code": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the code."
+ },
+ "status": {
+ "$ref": "#/definitions/WorkflowStatus",
+ "readOnly": true,
+ "description": "Gets the status."
+ },
+ "error": {
+ "$ref": "#/definitions/Object",
+ "readOnly": true,
+ "description": "Gets the error."
+ }
+ }
+ },
+ "WorkflowTriggerProvisioningState": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Creating",
+ "Succeeded",
+ "Updating"
+ ],
+ "x-ms-enum": {
+ "name": "WorkflowTriggerProvisioningState",
+ "modelAsString": false
+ }
+ },
+ "WorkflowProvisioningState": {
+ "type": "string",
+ "enum": [
+ "NotSpecified",
+ "Moving",
+ "Succeeded"
+ ],
+ "x-ms-enum": {
+ "name": "WorkflowProvisioningState",
+ "modelAsString": false
+ }
+ }
+ },
+ "parameters": {
+ "subscriptionId": {
+ "name": "subscriptionId",
+ "description": "The subscription id.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ "api-version": {
+ "name": "api-version",
+ "description": "The API version.",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/MachineLearning/2016-05-01-preview/webservices.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/MachineLearning/2016-05-01-preview/webservices.json
new file mode 100644
index 000000000000..687dd1c5105e
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/MachineLearning/2016-05-01-preview/webservices.json
@@ -0,0 +1,997 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Azure ML Web Services Management Client",
+ "description": "These APIs allow end users to operate on Azure Machine Learning Web Services resources. They support the following operations:- Create or update a web service
- Get a web service
- Patch a web service
- Delete a web service
- Get All Web Services in a Resource Group
- Get All Web Services in a Subscription
- Get Web Services Keys
",
+ "version": "2016-05-01-preview"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}": {
+ "put": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_CreateOrUpdate",
+ "description": "Creates or updates a new Azure ML web service or update an existing one.",
+ "parameters": [
+ {
+ "in": "body",
+ "name": "createOrUpdatePayload",
+ "description": "The payload to create or update the Azure ML web service.",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ },
+ "201": {
+ "description": "Created",
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "get": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_Get",
+ "description": "Retrieve an Azure ML web service definition by its subscription, resource group and name.",
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_Patch",
+ "description": "Patch an existing Azure ML web service resource.",
+ "parameters": [
+ {
+ "in": "body",
+ "name": "patchPayload",
+ "description": "The payload to patch the Azure ML web service with.",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WebService"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "delete": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_Remove",
+ "description": "Remove an existing Azure ML web service.",
+ "responses": {
+ "202": {
+ "description": "Async delete operation was accepted."
+ },
+ "204": {
+ "description": "No Content"
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "Name of the resource group.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "webServiceName",
+ "description": "The Azure ML web service name which you want to reach.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ {
+ "$ref": "#/parameters/APIVersionParameter"
+ }
+ ]
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}/listKeys": {
+ "get": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_ListKeys",
+ "description": "Get the access keys of a particular Azure ML web service",
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "Name of the resource group.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "webServiceName",
+ "description": "The Azure ML web service name which you want to reach.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ {
+ "$ref": "#/parameters/APIVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/WebServiceKeys"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices": {
+ "get": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_ListInResourceGroup",
+ "description": "Retrieve all Azure ML web services in a given resource group.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "description": "Name of the resource group.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ {
+ "$ref": "#/parameters/APIVersionParameter"
+ },
+ {
+ "in": "query",
+ "name": "$skiptoken",
+ "type": "string",
+ "description": "Continuation token for pagination.",
+ "required": false
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/PaginatedWebServicesList"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/webServices": {
+ "get": {
+ "tags": [
+ "WebServices"
+ ],
+ "operationId": "WebServices_List",
+ "description": "Retrieve all Azure ML web services in the current Azure subscription.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "$ref": "#/parameters/APIVersionParameter"
+ },
+ {
+ "in": "query",
+ "name": "$skiptoken",
+ "type": "string",
+ "description": "Continuation token for pagination.",
+ "required": false
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/PaginatedWebServicesList"
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "description": "Azure subscription id.",
+ "in": "path",
+ "type": "string",
+ "required": true
+ },
+ "APIVersionParameter": {
+ "in": "query",
+ "name": "api-version",
+ "type": "string",
+ "description": "The versiong of the Microsoft.MachineLearning resource provider API to be used.",
+ "required": true
+ }
+ },
+ "definitions": {
+ "Resource": {
+ "required": [
+ "location"
+ ],
+ "properties": {
+ "id": {
+ "description": "Resource Id",
+ "type": "string",
+ "readOnly": true
+ },
+ "name": {
+ "description": "Resource Name",
+ "type": "string"
+ },
+ "location": {
+ "description": "Resource Location",
+ "type": "string"
+ },
+ "type": {
+ "description": "Resource type",
+ "type": "string",
+ "readOnly": true
+ },
+ "tags": {
+ "description": "Resource tags",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "WebService": {
+ "type": "object",
+ "description": "Instance of an Azure ML web service resource.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ],
+ "properties": {
+ "properties": {
+ "$ref": "#/definitions/WebServiceProperties",
+ "description": "Web service resource properties."
+ }
+ },
+ "required": [
+ "properties"
+ ]
+ },
+ "WebServiceProperties": {
+ "type": "object",
+ "description": "The set of properties specific to the Azure ML web service resource.",
+ "required": [
+ "packageType"
+ ],
+ "discriminator": "packageType",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "The title of the Azure ML web service."
+ },
+ "description": {
+ "type": "string",
+ "description": "The description of the Azure ML web service."
+ },
+ "createdOn": {
+ "type": "string",
+ "description": "The moment of time the Azure ML web service was created.",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "modifiedOn": {
+ "type": "string",
+ "description": "The moment of time the web service was last modified.",
+ "format": "date-time",
+ "readOnly": true
+ },
+ "provisioningState": {
+ "type": "string",
+ "description": "The web service resource's provisioning state.",
+ "enum": [
+ "Unknown",
+ "Provisioning",
+ "Succeeded",
+ "Failed",
+ "Canceled"
+ ],
+ "x-ms-enum": {
+ "name": "ProvisioningState",
+ "modelAsString": true
+ },
+ "readOnly": true
+ },
+ "keys": {
+ "$ref": "#/definitions/WebServiceKeys",
+ "description": "The set of access keys for the web service. If not specified at creation time (PUT), they will be generated automatically by the resource provider."
+ },
+ "readOnly": {
+ "type": "boolean",
+ "description": "If true, the web service can no longer be updated / patched, only removed. Otherwise, the service resource supports changes."
+ },
+ "swaggerLocation": {
+ "type": "string",
+ "description": "The uri for the swagger spec associated with this web service.",
+ "readOnly": true
+ },
+ "exposeSampleData": {
+ "type": "boolean",
+ "description": "Flag that controls whether to expose sample data or not in the web service's swagger definition."
+ },
+ "realtimeConfiguration": {
+ "$ref": "#/definitions/RealtimeConfiguration",
+ "description": "Configuration for the service's realtime endpoint."
+ },
+ "diagnostics": {
+ "$ref": "#/definitions/DiagnosticsConfiguration",
+ "description": "Settings controlling the diagnostics traces collection for the web service."
+ },
+ "storageAccount": {
+ "$ref": "#/definitions/StorageAccount",
+ "description": "The storage account associated with the service. This is used to store both datasets and diagnostic traces. This information is required at creation time (PUT) and only the key is updateable after that. The account credentials are hidden on a GET web service call."
+ },
+ "machineLearningWorkspace": {
+ "$ref": "#/definitions/MachineLearningWorkspace",
+ "description": "This is only populated at creation time (PUT) for web services originating from an AzureML Studio experiment."
+ },
+ "commitmentPlan": {
+ "$ref": "#/definitions/CommitmentPlan",
+ "description": "The commitment plan associated with this web service. This is required to be specified at creation time (PUT) and is not updateable afterwards."
+ },
+ "input": {
+ "$ref": "#/definitions/ServiceInputOutputSpecification",
+ "description": "Swagger schema for the service's input(s), as applicable."
+ },
+ "output": {
+ "$ref": "#/definitions/ServiceInputOutputSpecification",
+ "description": "Swagger schema for the service's output(s), as applicable."
+ },
+ "exampleRequest": {
+ "$ref": "#/definitions/ExampleRequest",
+ "description": "Sample request data for each of the service's inputs, as applicable."
+ },
+ "assets": {
+ "type": "object",
+ "description": "Set of assets associated with the web service.",
+ "additionalProperties": {
+ "$ref": "#/definitions/AssetItem"
+ }
+ },
+ "parameters": {
+ "type": "object",
+ "description": "The set of global parameters values defined for the web service, given as a global parameter name to default value map. If no default value is specified, the parameter is considered to be required.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "packageType": {
+ "type": "string",
+ "description": "The type of package deployed with this web service. Only Graph based services are supported at this time.",
+ "enum": [
+ "Graph"
+ ]
+ }
+ }
+ },
+ "WebServicePropertiesForGraph": {
+ "description": "Properties specific to a Graph based web service.",
+ "x-ms-discriminator-value": "Graph",
+ "allOf": [
+ {
+ "$ref": "#/definitions/WebServiceProperties"
+ }
+ ],
+ "properties": {
+ "package": {
+ "description": "The definition of the graph package making up this web service.",
+ "$ref": "#/definitions/GraphPackage"
+ }
+ }
+ },
+ "WebServiceKeys": {
+ "type": "object",
+ "description": "Access keys for the web service calls.",
+ "properties": {
+ "primary": {
+ "type": "string",
+ "description": "The primary access key."
+ },
+ "secondary": {
+ "type": "string",
+ "description": "The secondary access key."
+ }
+ }
+ },
+ "PaginatedWebServicesList": {
+ "type": "object",
+ "description": "Paginated list of web services.",
+ "properties": {
+ "value": {
+ "type": "array",
+ "description": "List of web services objects.",
+ "items": {
+ "$ref": "#/definitions/WebService"
+ }
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Continuation link to be used to potentially retrieve the next page of results in the list."
+ }
+ }
+ },
+ "RealtimeConfiguration": {
+ "type": "object",
+ "description": "Holds the available configuration options for an Azure ML web service endpoint.",
+ "properties": {
+ "maxConcurrentCalls": {
+ "type": "integer",
+ "minimum": 4,
+ "maximum": 200,
+ "description": "Maximum number of concurrent calls allowed on the realtime endpoint."
+ }
+ }
+ },
+ "DiagnosticsConfiguration": {
+ "type": "object",
+ "description": "Diagnostics settings for an Azure ML web service.",
+ "properties": {
+ "level": {
+ "type": "string",
+ "description": "Level of tracing to be used: None - disables tracing; Error - collects only error (stderr) traces; All - collects all traces (stdout and stderr).",
+ "enum": [
+ "None",
+ "Error",
+ "All"
+ ],
+ "x-ms-enum": {
+ "name": "DiagnosticsLevel",
+ "modelAsString": true
+ }
+ },
+ "expiry": {
+ "type": "string",
+ "description": "Moment of time after which diagnostics are no longer collected. If null, diagnostic collection is not time limited.",
+ "format": "date-time"
+ }
+ },
+ "required": [
+ "level"
+ ]
+ },
+ "StorageAccount": {
+ "type": "object",
+ "description": "Access information for a storage account.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The storage account's name."
+ },
+ "key": {
+ "type": "string",
+ "description": "The storage account's active key."
+ }
+ }
+ },
+ "MachineLearningWorkspace": {
+ "type": "object",
+ "description": "Information about the machine learning workspace containing the experiment that is source for the web service.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The workspace ARM resource id."
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "CommitmentPlan": {
+ "type": "object",
+ "description": "Information about the machine learning commitment plan associated with the web service.",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The commitment plan ARM resource id."
+ }
+ },
+ "required": [
+ "id"
+ ]
+ },
+ "ServiceInputOutputSpecification": {
+ "type": "object",
+ "description": "The swagger 2.0 schema describing the service's inputs or outputs. See Swagger specification: http://swagger.io/specification/",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Swagger schema title."
+ },
+ "description": {
+ "type": "string",
+ "description": "Swagger schema description."
+ },
+ "type": {
+ "type": "string",
+ "description": "The type of the entity described in swagger. Always 'object'.",
+ "default": "object"
+ },
+ "properties": {
+ "type": "object",
+ "description": "Map of name to swagger schema for each input or output of the web service.",
+ "additionalProperties": {
+ "$ref": "#/definitions/TableSpecification"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "properties"
+ ]
+ },
+ "TableSpecification": {
+ "type": "object",
+ "description": "The swagger 2.0 schema describing a single service input or output. See Swagger specification: http://swagger.io/specification/",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Swagger schema title."
+ },
+ "description": {
+ "type": "string",
+ "description": "Swagger schema description."
+ },
+ "type": {
+ "type": "string",
+ "description": "The type of the entity described in swagger.",
+ "default": "object"
+ },
+ "format": {
+ "type": "string",
+ "description": "The format, if 'type' is not 'object'"
+ },
+ "properties": {
+ "type": "object",
+ "description": "The set of columns within the data table.",
+ "additionalProperties": {
+ "$ref": "#/definitions/ColumnSpecification"
+ }
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "ColumnSpecification": {
+ "type": "object",
+ "description": "Swagger 2.0 schema for a column within the data table representing a web service input or output. See Swagger specification: http://swagger.io/specification/",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Data type of the column.",
+ "enum": [
+ "Boolean",
+ "Integer",
+ "Number",
+ "String"
+ ],
+ "x-ms-enum": {
+ "name": "ColumnType",
+ "modelAsString": true
+ }
+ },
+ "format": {
+ "type": "string",
+ "description": "Additional format information for the data type.",
+ "enum": [
+ "Byte",
+ "Char",
+ "Datetime",
+ "Double",
+ "Duration",
+ "Float",
+ "Int8",
+ "Int16",
+ "Int32",
+ "Int64",
+ "Uint8",
+ "Uint16",
+ "Uint32",
+ "Uint64"
+ ],
+ "x-ms-enum": {
+ "name": "ColumnFormat",
+ "modelAsString": true
+ }
+ },
+ "enum": {
+ "type": "array",
+ "description": "If the data type is categorical, this provides the list of accepted categories.",
+ "items": {
+ "type": "object"
+ }
+ },
+ "x-ms-isnullable": {
+ "type": "boolean",
+ "description": "Flag indicating if the type supports null values or not."
+ },
+ "x-ms-isordered": {
+ "type": "boolean",
+ "description": "Flag indicating whether the categories are treated as an ordered set or not, if this is a categorical column."
+ }
+ },
+ "required": [
+ "type"
+ ]
+ },
+ "ExampleRequest": {
+ "type": "object",
+ "description": "Sample input data for the service's input(s).",
+ "properties": {
+ "inputs": {
+ "type": "object",
+ "description": "Sample input data for the web service's input(s) given as an input name to sample input values matrix map.",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "globalParameters": {
+ "type": "object",
+ "description": "Sample input data for the web service's global parameters",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "AssetItem": {
+ "type": "object",
+ "description": "Information about an asset associated with the web service.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Asset's friendly name."
+ },
+ "id": {
+ "type": "string",
+ "description": "Asset's Id."
+ },
+ "type": {
+ "type": "string",
+ "description": "Asset's type.",
+ "enum": [
+ "Module",
+ "Resource"
+ ],
+ "x-ms-enum": {
+ "name": "AssetType",
+ "modelAsString": true
+ }
+ },
+ "locationInfo": {
+ "description": "Access information for the asset.",
+ "$ref": "#/definitions/AssetLocation"
+ },
+ "inputPorts": {
+ "type": "object",
+ "description": "Information about the asset's input ports.",
+ "additionalProperties": {
+ "$ref": "#/definitions/InputPort"
+ }
+ },
+ "outputPorts": {
+ "type": "object",
+ "description": "Information about the asset's output ports.",
+ "additionalProperties": {
+ "$ref": "#/definitions/OutputPort"
+ }
+ },
+ "metadata": {
+ "type": "object",
+ "description": "If the asset is a custom module, this holds the module's metadata.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "parameters": {
+ "type": "array",
+ "description": "If the asset is a custom module, this holds the module's parameters.",
+ "items": {
+ "$ref": "#/definitions/ModuleAssetParameter"
+ }
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "locationInfo"
+ ]
+ },
+ "AssetLocation": {
+ "type": "object",
+ "description": "Describes the access location for a web service asset.",
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "The URI where the asset is accessible from, (e.g. aml://abc for system assets or https://xyz for user asets",
+ "format": "url"
+ },
+ "credentials": {
+ "type": "string",
+ "description": "Access credentials for the asset, if applicable (e.g. asset specified by storage account connection string + blob URI)"
+ }
+ },
+ "required": [
+ "uri"
+ ]
+ },
+ "ModuleAssetParameter": {
+ "type": "object",
+ "description": "Parameter definition for a module asset.",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Parameter name."
+ },
+ "parameterType": {
+ "type": "string",
+ "description": "Parameter type."
+ },
+ "modeValuesInfo": {
+ "type": "object",
+ "description": "Definitions for nested interface parameters if this is a complex module parameter.",
+ "additionalProperties": {
+ "$ref": "#/definitions/ModeValueInfo"
+ }
+ }
+ }
+ },
+ "ModeValueInfo": {
+ "type": "object",
+ "description": "Nested parameter definition.",
+ "properties": {
+ "interfaceString": {
+ "type": "string",
+ "description": "The interface string name for the nested parameter."
+ },
+ "parameters": {
+ "type": "array",
+ "description": "The definition of the parameter.",
+ "items": {
+ "$ref": "#/definitions/ModuleAssetParameter"
+ }
+ }
+ }
+ },
+ "InputPort": {
+ "type": "object",
+ "description": "Asset input port",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Port data type.",
+ "enum": [
+ "Dataset"
+ ],
+ "x-ms-enum": {
+ "name": "InputPortType",
+ "modelAsString": true
+ },
+ "default": "Dataset"
+ }
+ }
+ },
+ "OutputPort": {
+ "type": "object",
+ "description": "Asset output port",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Port data type.",
+ "enum": [
+ "Dataset"
+ ],
+ "x-ms-enum": {
+ "name": "OutputPortType",
+ "modelAsString": true
+ },
+ "default": "Dataset"
+ }
+ }
+ },
+ "GraphPackage": {
+ "type": "object",
+ "description": "Defines the graph of modules making up the machine learning solution.",
+ "properties": {
+ "nodes": {
+ "type": "object",
+ "description": "The set of nodes making up the graph, provided as a nodeId to GraphNode map",
+ "additionalProperties": {
+ "$ref": "#/definitions/GraphNode"
+ }
+ },
+ "edges": {
+ "type": "array",
+ "description": "The list of edges making up the graph.",
+ "items": {
+ "$ref": "#/definitions/GraphEdge"
+ }
+ },
+ "graphParameters": {
+ "type": "object",
+ "description": "The collection of global parameters for the graph, given as a global parameter name to GraphParameter map. Each parameter here has a 1:1 match with the global parameters values map declared at the WebServiceProperties level.",
+ "additionalProperties": {
+ "$ref": "#/definitions/GraphParameter"
+ }
+ }
+ }
+ },
+ "GraphNode": {
+ "type": "object",
+ "description": "Specifies a node in the web service graph. The node can either be an input, output or asset node, so only one of the corresponding id properties is populated at any given time.",
+ "properties": {
+ "assetId": {
+ "type": "string",
+ "description": "The id of the asset represented by this node."
+ },
+ "inputId": {
+ "type": "string",
+ "description": "The id of the input element represented by this node."
+ },
+ "outputId": {
+ "type": "string",
+ "description": "The id of the output element represented by this node."
+ },
+ "parameters": {
+ "type": "object",
+ "description": "If applicable, parameters of the node. Global graph parameters map into these, with values set at runtime.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "GraphEdge": {
+ "type": "object",
+ "description": "Defines an edge within the web service's graph.",
+ "properties": {
+ "sourceNodeId": {
+ "type": "string",
+ "description": "The source graph node's identifier."
+ },
+ "sourcePortId": {
+ "type": "string",
+ "description": "The identifier of the source node's port that the edge connects from."
+ },
+ "targetNodeId": {
+ "type": "string",
+ "description": "The destination graph node's identifier."
+ },
+ "targetPortId": {
+ "type": "string",
+ "description": "The identifier of the destination node's port that the edge connects into."
+ }
+ }
+ },
+ "GraphParameter": {
+ "type": "object",
+ "description": "Defines a global parameter in the graph.",
+ "properties": {
+ "description": {
+ "type": "string",
+ "description": "Description of this graph parameter."
+ },
+ "type": {
+ "type": "string",
+ "description": "Graph parameter's type.",
+ "enum": [
+ "String",
+ "Int",
+ "Float",
+ "Enumerated",
+ "Script",
+ "Mode",
+ "Credential",
+ "Boolean",
+ "Double",
+ "ColumnPicker",
+ "ParameterRange",
+ "DataGatewayName"
+ ],
+ "x-ms-enum": {
+ "name": "ParameterType",
+ "modelAsString": true
+ }
+ },
+ "links": {
+ "type": "array",
+ "description": "Association links for this parameter to nodes in the graph.",
+ "items": {
+ "$ref": "#/definitions/GraphParameterLink"
+ }
+ }
+ },
+ "required": [
+ "type",
+ "links"
+ ]
+ },
+ "GraphParameterLink": {
+ "type": "object",
+ "description": "Association link for a graph global parameter to a node in the graph.",
+ "properties": {
+ "nodeId": {
+ "type": "string",
+ "description": "The graph node's identifier"
+ },
+ "parameterKey": {
+ "type": "string",
+ "description": "The identifier of the node parameter that the global parameter maps to."
+ }
+ },
+ "required": [
+ "nodeId",
+ "parameterKey"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/PowerBIEmbedded/2016-01-29/powerbiembedded.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/PowerBIEmbedded/2016-01-29/powerbiembedded.json
new file mode 100644
index 000000000000..474029d635c7
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/PowerBIEmbedded/2016-01-29/powerbiembedded.json
@@ -0,0 +1,948 @@
+{
+ "swagger": "2.0",
+ "host": "management.azure.com",
+ "info": {
+ "version": "2016-01-29",
+ "title": "Power BI Embedded Management Client",
+ "description": "Client to manage your Power BI embedded workspace collections and retrieve workspaces."
+ },
+ "schemes": [
+ "https",
+ "http"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}": {
+ "get": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_getByName",
+ "description": "Retrieves an existing Power BI Workspace Collection.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspace collection created successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollection"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_create",
+ "description": "Creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection contains one or more Power BI Workspaces and can be used to provision keys that provide API access to those Power BI Workspaces.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "description": "Create workspace collection request",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreateWorkspaceCollectionRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspace collection created successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollection"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_update",
+ "description": "Update an existing Power BI Workspace Collection with the specified properties.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "description": "Update workspace collection request",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/UpdateWorkspaceCollectionRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspace collection updated successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollection"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ },
+ "delete": {
+ "x-ms-long-running-operation": true,
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_delete",
+ "description": "Delete a Power BI Workspace Collection.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": "Workspace collection deleted successfully"
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability": {
+ "post": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_checkNameAvailability",
+ "description": "Check that the specified Power BI Workspace Collection name is valid and not in use.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "location",
+ "in": "path",
+ "description": "Azure location",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "description": "Check name availability request",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CheckNameRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Request completed successfully",
+ "schema": {
+ "$ref": "#/definitions/CheckNameResponse"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections": {
+ "get": {
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_listByResourceGroup",
+ "description": "Retrieves all existing Power BI Workspace Collections in the specified resource group.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get workspaces response",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollectionList"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections": {
+ "get": {
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_listBySubscription",
+ "description": "Retrieves all existing Power BI Workspace Collections in the specified subscription.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get workspaces response",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollectionList"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys": {
+ "post": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_getAccessKeys",
+ "description": "Retrieves the primary and secondary access keys for the specified Power BI Workspace Collection.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get access keys completed successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollectionAccessKeys"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey": {
+ "post": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_regenerateKey",
+ "description": "Regenerates the primary or secondary access key for the specified Power BI Workspace Collection.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "description": "Access key to regenerate",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollectionAccessKey"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get access keys completed successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceCollectionAccessKeys"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/providers/Microsoft.PowerBI/operations": {
+ "get": {
+ "tags": [
+ "Operations"
+ ],
+ "operationId": "getAvailableOperations",
+ "description": "Indicates which operations can be performed by the Power BI Resource Provider.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Request completed successfully",
+ "schema": {
+ "$ref": "#/definitions/OperationList"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces": {
+ "get": {
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "tags": [
+ "Workspaces"
+ ],
+ "operationId": "Workspaces_List",
+ "description": "Retrieves all existing Power BI Workspaces in the specified Workspace Collection.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "workspaceCollectionName",
+ "in": "path",
+ "description": "Power BI Embedded workspace collection name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get workspaces completed successfully",
+ "schema": {
+ "$ref": "#/definitions/WorkspaceList"
+ }
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources": {
+ "post": {
+ "tags": [
+ "WorkspaceCollections"
+ ],
+ "operationId": "WorkspaceCollections_migrate",
+ "description": "Migrates an existing Power BI Workspace Collection to a different resource group and/or subscription.",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "description": "Azure resource group",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "description": "Workspace migration request",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/MigrateWorkspaceCollectionRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Migration completed successfully"
+ },
+ "default": {
+ "description": "Default Response. It will be deserialized as per the Error defintion specified in the schema. Exception will be thrown.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "Error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "target": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ErrorDetail"
+ }
+ }
+ }
+ },
+ "ErrorDetail": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "target": {
+ "type": "string"
+ }
+ }
+ },
+ "WorkspaceCollectionList": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WorkspaceCollection"
+ }
+ }
+ }
+ },
+ "WorkspaceList": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Workspace"
+ }
+ }
+ }
+ },
+ "OperationList": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Operation"
+ }
+ }
+ }
+ },
+ "AzureSku": {
+ "type": "object",
+ "required": [
+ "name",
+ "tier"
+ ],
+ "properties": {
+ "name": {
+ "description": "SKU name",
+ "type": "string",
+ "enum": [
+ "S1"
+ ],
+ "x-ms-enum": {
+ "name": "AzureSkuName",
+ "modelAsString": true
+ }
+ },
+ "tier": {
+ "description": "SKU tier",
+ "type": "string",
+ "enum": [
+ "Standard"
+ ],
+ "x-ms-enum": {
+ "name": "AzureSkuTier",
+ "modelAsString": true
+ }
+ }
+ }
+ },
+ "WorkspaceCollectionAccessKeys": {
+ "type": "object",
+ "properties": {
+ "key1": {
+ "description": "Access key 1",
+ "type": "string"
+ },
+ "key2": {
+ "description": "Access key 2",
+ "type": "string"
+ }
+ }
+ },
+ "WorkspaceCollectionAccessKey": {
+ "type": "object",
+ "properties": {
+ "keyName": {
+ "description": "Key name",
+ "type": "string",
+ "enum": [
+ "key1",
+ "key2"
+ ],
+ "x-ms-enum": {
+ "name": "AccessKeyName",
+ "modelAsString": false
+ }
+ }
+ }
+ },
+ "Workspace": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "Workspace id",
+ "type": "string"
+ },
+ "name": {
+ "description": "Workspace name",
+ "type": "string"
+ },
+ "type": {
+ "description": "Resource type",
+ "type": "string"
+ },
+ "properties": {
+ "description": "Property bag",
+ "type": "object"
+ }
+ }
+ },
+ "WorkspaceCollection": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "Resource id",
+ "type": "string"
+ },
+ "name": {
+ "description": "Workspace collection name",
+ "type": "string"
+ },
+ "type": {
+ "description": "Resource type",
+ "type": "string"
+ },
+ "location": {
+ "description": "Azure location",
+ "type": "string"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "sku": {
+ "$ref": "#/definitions/AzureSku"
+ },
+ "properties": {
+ "description": "Properties",
+ "type": "object"
+ }
+ }
+ },
+ "CreateWorkspaceCollectionRequest": {
+ "type": "object",
+ "properties": {
+ "location": {
+ "type": "string",
+ "description": "Azure location"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "sku": {
+ "$ref": "#/definitions/AzureSku"
+ }
+ }
+ },
+ "UpdateWorkspaceCollectionRequest": {
+ "type": "object",
+ "properties": {
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "sku": {
+ "$ref": "#/definitions/AzureSku"
+ }
+ }
+ },
+ "CheckNameRequest": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Workspace collection name"
+ },
+ "type": {
+ "type": "string",
+ "description": "Resource type",
+ "default": "Microsoft.PowerBI/workspaceCollections"
+ }
+ }
+ },
+ "CheckNameResponse": {
+ "type": "object",
+ "properties": {
+ "nameAvailable": {
+ "type": "boolean",
+ "description": "Specifies a Boolean value that indicates whether the specified Power BI Workspace Collection name is available to use."
+ },
+ "reason": {
+ "type": "string",
+ "description": "Reason why the workspace collection name cannot be used.",
+ "enum": [
+ "Unavailable",
+ "Invalid"
+ ],
+ "x-ms-enum": {
+ "name": "CheckNameReason",
+ "modelAsString": true
+ }
+ },
+ "message": {
+ "type": "string",
+ "description": "Message indicating an unavailable name due to a conflict or a description of the naming rules that are violated."
+ }
+ }
+ },
+ "MigrateWorkspaceCollectionRequest": {
+ "type": "object",
+ "properties": {
+ "targetResourceGroup": {
+ "type": "string",
+ "description": "Name of the resource group that the Power BI Workspace Collections will be migrated to."
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "Operation": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service."
+ },
+ "display": {
+ "$ref": "#/definitions/Display"
+ }
+ }
+ },
+ "Display": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "The localized friendly form of the resource provider name – it is expected to also include the publisher/company responsible. It should use Title Casing and begin with “Microsoft” for 1st party services."
+ },
+ "resource": {
+ "type": "string",
+ "description": "The localized friendly form of the resource type related to this action/operation – it should match the public documentation for the resource provider. It should use Title Casing – for examples, please refer to the “name” section."
+ },
+ "operation": {
+ "type": "string",
+ "description": "The localized friendly name for the operation, as it should be shown to the user. It should be concise (to fit in drop downs) but clear (i.e. self-documenting). It should use Title Casing and include the entity/resource to which it applies."
+ },
+ "description": {
+ "type": "string",
+ "description": "The localized friendly description for the operation, as it should be shown to the user. It should be thorough, yet concise – it will be used in tool tips and detailed views."
+ },
+ "origin": {
+ "type": "string",
+ "description": "The intended executor of the operation; governs the display of the operation in the RBAC UX and the audit logs UX. Default value is 'user,system'"
+ }
+ }
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Redis/2016-04-01/redis.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Redis/2016-04-01/redis.json
new file mode 100644
index 000000000000..ffb846962c87
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Redis/2016-04-01/redis.json
@@ -0,0 +1,815 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "RedisManagementClient",
+ "description": "REST API for Azure Redis Cache Service",
+ "version": "2016-04-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}": {
+ "put": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_CreateOrUpdate",
+ "description": "Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/RedisCreateOrUpdateParameters"
+ },
+ "description": "Parameters supplied to the CreateOrUpdate redis operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/RedisResourceWithAccessKey"
+ }
+ },
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/RedisResourceWithAccessKey"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_Delete",
+ "description": "Deletes a redis cache. This operation takes a while to complete.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_Get",
+ "description": "Gets a redis cache (resource description).",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/RedisResource"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/": {
+ "get": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_ListByResourceGroup",
+ "description": "Gets all redis caches in a resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/RedisListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis/": {
+ "get": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_List",
+ "description": "Gets all redis caches in the specified subscription.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/RedisListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys": {
+ "post": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_ListKeys",
+ "description": "Retrieve a redis cache's access keys. This operation requires write permission to the cache resource.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Lists the keys for Redis Cache",
+ "schema": {
+ "$ref": "#/definitions/RedisListKeysResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey": {
+ "post": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_RegenerateKey",
+ "description": "Regenerate redis cache's access keys. This operation requires write permission to the cache resource.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/RedisRegenerateKeyParameters"
+ },
+ "description": "Specifies which key to reset."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Lists the regenerated keys for Redis Cache",
+ "schema": {
+ "$ref": "#/definitions/RedisListKeysResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot": {
+ "post": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_ForceReboot",
+ "description": "Reboot specified redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/RedisRebootParameters"
+ },
+ "description": "Specifies which redis node(s) to reboot."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import": {
+ "post": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_import",
+ "x-ms-long-running-operation": true,
+ "description": "Import data into redis cache.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ImportRDBParameters"
+ },
+ "description": "Parameters for redis import operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export": {
+ "post": {
+ "tags": [
+ "Redis"
+ ],
+ "operationId": "Redis_export",
+ "x-ms-long-running-operation": true,
+ "description": "Import data into redis cache.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group."
+ },
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the redis cache."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ExportRDBParameters"
+ },
+ "description": "Parameters for redis export operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "Sku": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "What type of redis cache to deploy. Valid values: (Basic, Standard, Premium)",
+ "enum": [
+ "Basic",
+ "Standard",
+ "Premium"
+ ],
+ "x-ms-enum": {
+ "name": "SkuName",
+ "modelAsString": true
+ }
+ },
+ "family": {
+ "type": "string",
+ "description": "Which family to use. Valid values: (C, P)",
+ "enum": [
+ "C",
+ "P"
+ ],
+ "x-ms-enum": {
+ "name": "SkuFamily",
+ "modelAsString": true
+ }
+ },
+ "capacity": {
+ "type": "integer",
+ "format": "int32",
+ "description": "What size of redis cache to deploy. Valid values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)"
+ }
+ },
+ "required": [
+ "name",
+ "family",
+ "capacity"
+ ],
+ "description": "Sku parameters supplied to the create redis operation."
+ },
+ "RedisProperties": {
+ "properties": {
+ "redisVersion": {
+ "type": "string",
+ "description": "RedisVersion parameter has been deprecated. As such, it is no longer necessary to provide this parameter and any value specified is ignored."
+ },
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "What sku of redis cache to deploy."
+ },
+ "redisConfiguration": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc."
+ },
+ "enableNonSslPort": {
+ "type": "boolean",
+ "description": "If the value is true, then the non-ssl redis server port (6379) will be enabled."
+ },
+ "tenantSettings": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "tenantSettings"
+ },
+ "shardCount": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The number of shards to be created on a Premium Cluster Cache."
+ },
+ "subnetId": {
+ "type": "string",
+ "description": "The full resource ID of a subnet in a virtual network to deploy the redis cache in. Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1"
+ },
+ "staticIP": {
+ "type": "string",
+ "description": "Required when deploying a redis cache inside an existing Azure Virtual Network."
+ }
+ },
+ "required": [
+ "sku"
+ ],
+ "description": "Properties supplied to CreateOrUpdate redis operation."
+ },
+ "Resource": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource Id"
+ },
+ "name": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource name"
+ },
+ "type": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource type"
+ },
+ "location": {
+ "type": "string",
+ "description": "Resource location"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Resource tags"
+ }
+ },
+ "required": [
+ "location"
+ ],
+ "x-ms-azure-resource": true
+ },
+ "RedisCreateOrUpdateParameters": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/RedisProperties",
+ "description": "Redis cache properties."
+ }
+ },
+ "required": [
+ "properties"
+ ],
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ],
+ "description": "Parameters supplied to the CreateOrUpdate Redis operation."
+ },
+ "RedisAccessKeys": {
+ "properties": {
+ "primaryKey": {
+ "type": "string",
+ "description": "The current primary key that clients can use to authenticate with redis cache."
+ },
+ "secondaryKey": {
+ "type": "string",
+ "description": "The current secondary key that clients can use to authenticate with redis cache."
+ }
+ },
+ "description": "Redis cache access keys."
+ },
+ "RedisReadableProperties": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Redis instance provisioning status"
+ },
+ "hostName": {
+ "type": "string",
+ "description": "Redis host name"
+ },
+ "port": {
+ "type": "integer",
+ "format": "int32",
+ "description": "Redis non-ssl port"
+ },
+ "sslPort": {
+ "type": "integer",
+ "format": "int32",
+ "description": "Redis ssl port"
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/RedisProperties"
+ }
+ ],
+ "description": "Parameters describing a redis instance"
+ },
+ "RedisReadablePropertiesWithAccessKey": {
+ "properties": {
+ "accessKeys": {
+ "$ref": "#/definitions/RedisAccessKeys",
+ "description": "Redis cache access keys."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/RedisReadableProperties"
+ }
+ ],
+ "description": "Properties generated only in response to CreateOrUpdate redis operation."
+ },
+ "RedisResourceWithAccessKey": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/RedisReadablePropertiesWithAccessKey",
+ "description": "Redis cache properties"
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ],
+ "description": "A redis item in CreateOrUpdate Operation response."
+ },
+ "RedisResource": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/RedisReadableProperties",
+ "description": "Redis cache properties"
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Resource"
+ }
+ ],
+ "description": "A single redis item in List or Get Operation."
+ },
+ "RedisListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/RedisResource"
+ },
+ "description": "Results of the list operation"
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Link for next set of locations."
+ }
+ },
+ "description": "The response of list redis operation."
+ },
+ "RedisListKeysResult": {
+ "properties": {
+ "primaryKey": {
+ "type": "string",
+ "description": "The current primary key that clients can use to authenticate with redis cache."
+ },
+ "secondaryKey": {
+ "type": "string",
+ "description": "The current secondary key that clients can use to authenticate with redis cache."
+ }
+ },
+ "description": "The response of redis list keys operation."
+ },
+ "RedisRegenerateKeyParameters": {
+ "properties": {
+ "keyType": {
+ "type": "string",
+ "description": "Which redis access key to reset",
+ "enum": [
+ "Primary",
+ "Secondary"
+ ],
+ "x-ms-enum": {
+ "name": "RedisKeyType",
+ "modelAsString": false
+ }
+ }
+ },
+ "required": [
+ "keyType"
+ ],
+ "description": "Specifies which redis access keys to reset."
+ },
+ "RedisRebootParameters": {
+ "properties": {
+ "rebootType": {
+ "type": "string",
+ "description": "Which redis node(s) to reboot. Depending on this value data loss is possible.",
+ "enum": [
+ "PrimaryNode",
+ "SecondaryNode",
+ "AllNodes"
+ ],
+ "x-ms-enum": {
+ "name": "RebootType",
+ "modelAsString": true
+ }
+ },
+ "shardId": {
+ "type": "integer",
+ "format": "int32",
+ "description": "In case of cluster cache, this specifies shard id which should be rebooted."
+ }
+ },
+ "required": [
+ "rebootType"
+ ],
+ "description": "Specifies which redis node(s) to reboot."
+ },
+ "ExportRDBParameters": {
+ "properties": {
+ "format": {
+ "type": "string",
+ "description": "File format."
+ },
+ "prefix": {
+ "type": "string",
+ "description": "Prifix to use for exported files."
+ },
+ "container": {
+ "type": "string",
+ "description": "Container name to export to."
+ }
+ },
+ "required": [
+ "container",
+ "prefix"
+ ],
+ "description": "Parameters for redis export operation."
+ },
+ "ImportRDBParameters": {
+ "properties": {
+ "format": {
+ "type": "string",
+ "description": "File format."
+ },
+ "files": {
+ "type": "array",
+ "description": "files to import",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "files"
+ ],
+ "description": "Parameters for redis import operation."
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Resources/2016-02-01/resources.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Resources/2016-02-01/resources.json
new file mode 100644
index 000000000000..048d969755cb
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Resources/2016-02-01/resources.json
@@ -0,0 +1,2356 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "ResourceManagementClient",
+ "version": "2016-02-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}": {
+ "delete": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_Delete",
+ "description": "Delete deployment.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment to be deleted."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "head": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_CheckExistence",
+ "description": "Checks whether deployment exists.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to check. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_CreateOrUpdate",
+ "description": "Create a named template deployment using a template.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Deployment"
+ },
+ "description": "Additional parameters supplied to the operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "get": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_Get",
+ "description": "Get a deployment.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to get. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExtended"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel": {
+ "post": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_Cancel",
+ "description": "Cancel a currently running template deployment.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate": {
+ "post": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_Validate",
+ "description": "Validate a deployment template.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Deployment"
+ },
+ "description": "Deployment to validate."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentValidateResult"
+ }
+ },
+ "400": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentValidateResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate": {
+ "post": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_ExportTemplate",
+ "description": "Exports a deployment template.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentExportResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/": {
+ "get": {
+ "tags": [
+ "Deployments"
+ ],
+ "operationId": "Deployments_List",
+ "description": "Get a list of deployments.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to filter by. The name is case insensitive."
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The filter to apply on the operation."
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters. If null is passed returns all deployments."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/DeploymentExtendedFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister": {
+ "post": {
+ "tags": [
+ "Providers"
+ ],
+ "operationId": "Providers_Unregister",
+ "description": "Unregisters provider from a subscription.",
+ "parameters": [
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Namespace of the resource provider."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/Provider"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register": {
+ "post": {
+ "tags": [
+ "Providers"
+ ],
+ "operationId": "Providers_Register",
+ "description": "Registers provider to be used with a subscription.",
+ "parameters": [
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Namespace of the resource provider."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/Provider"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers": {
+ "get": {
+ "tags": [
+ "Providers"
+ ],
+ "operationId": "Providers_List",
+ "description": "Gets a list of resource providers.",
+ "parameters": [
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters. If null is passed returns all deployments."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ProviderListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}": {
+ "get": {
+ "tags": [
+ "Providers"
+ ],
+ "operationId": "Providers_Get",
+ "description": "Gets a resource provider.",
+ "parameters": [
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Namespace of the resource provider."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/Provider"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources": {
+ "get": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_ListResources",
+ "description": "Get all of the resources under a subscription.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Query parameters. If null is passed returns all resource groups."
+ },
+ {
+ "name": "$filter",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The filter to apply on the operation."
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters. If null is passed returns all resource groups."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/GenericResourceFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}": {
+ "head": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_CheckExistence",
+ "description": "Checks whether resource group exists.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to check. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_CreateOrUpdate",
+ "description": "Create a resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to be created or updated.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ },
+ "description": "Parameters supplied to the create or update resource group service operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ }
+ },
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_Delete",
+ "description": "Delete resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to be deleted. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ },
+ "200": {
+ "description": ""
+ }
+ },
+ "x-ms-long-running-operation": true
+ },
+ "get": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_Get",
+ "description": "Get a resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to get. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_Patch",
+ "description": "Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource groups, though if a field is unspecified current value will be carried over. ",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to be created or updated. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ },
+ "description": "Parameters supplied to the update state resource group service operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroup"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate": {
+ "post": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_ExportTemplate",
+ "description": "Captures the specified resource group as a template.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group to be created or updated.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ExportTemplateRequest"
+ },
+ "description": "Parameters supplied to the export template resource group operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroupExportResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups": {
+ "get": {
+ "tags": [
+ "ResourceGroups"
+ ],
+ "operationId": "ResourceGroups_List",
+ "description": "Gets a collection of resource groups.",
+ "parameters": [
+ {
+ "name": "$filter",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The filter to apply on the operation."
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters. If null is passed returns all resource groups."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceGroupListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/ResourceGroupFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/moveResources": {
+ "post": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_MoveResources",
+ "description": "Move resources from one resource group to another. The resources being moved should all be in the same resource group.",
+ "parameters": [
+ {
+ "name": "sourceResourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Source resource group name.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/ResourcesMoveInfo"
+ },
+ "description": "move resources' parameters."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "202": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/subscriptions/{subscriptionId}/resources": {
+ "get": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_List",
+ "description": "Get all of the resources under a subscription.",
+ "parameters": [
+ {
+ "name": "$filter",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "description": "The filter to apply on the operation."
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters. If null is passed returns all resource groups."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ },
+ "x-ms-odata": "#/definitions/GenericResourceFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}": {
+ "head": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_CheckExistence",
+ "description": "Checks whether resource exists.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "parentResourcePath",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_Delete",
+ "description": "Delete resource and all of its resources. ",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "parentResourcePath",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ },
+ "202": {
+ "description": ""
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_CreateOrUpdate",
+ "description": "Create a resource.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "parentResourcePath",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/GenericResource"
+ },
+ "description": "Create or update resource parameters."
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/GenericResource"
+ }
+ },
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/GenericResource"
+ }
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Resources"
+ ],
+ "operationId": "Resources_Get",
+ "description": "Returns a resource belonging to a resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "parentResourcePath",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity.",
+ "x-ms-skip-url-encoding": true
+ },
+ {
+ "name": "resourceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/GenericResource"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}": {
+ "delete": {
+ "tags": [
+ "Tags"
+ ],
+ "operationId": "Tags_DeleteValue",
+ "description": "Delete a subscription resource tag value.",
+ "parameters": [
+ {
+ "name": "tagName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the tag."
+ },
+ {
+ "name": "tagValue",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The value of the tag."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Tags"
+ ],
+ "operationId": "Tags_CreateOrUpdateValue",
+ "description": "Create a subscription resource tag value.",
+ "parameters": [
+ {
+ "name": "tagName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the tag."
+ },
+ {
+ "name": "tagValue",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The value of the tag."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TagValue"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TagValue"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/tagNames/{tagName}": {
+ "put": {
+ "tags": [
+ "Tags"
+ ],
+ "operationId": "Tags_CreateOrUpdate",
+ "description": "Create a subscription resource tag.",
+ "parameters": [
+ {
+ "name": "tagName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the tag."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TagDetails"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TagDetails"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Tags"
+ ],
+ "operationId": "Tags_Delete",
+ "description": "Delete a subscription resource tag.",
+ "parameters": [
+ {
+ "name": "tagName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the tag."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/tagNames": {
+ "get": {
+ "tags": [
+ "Tags"
+ ],
+ "operationId": "Tags_List",
+ "description": "Get a list of subscription resource tags.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TagsListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}": {
+ "get": {
+ "tags": [
+ "DeploymentOperations"
+ ],
+ "operationId": "DeploymentOperations_Get",
+ "description": "Get a list of deployments operations.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "name": "operationId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Operation Id."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentOperation"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations": {
+ "get": {
+ "tags": [
+ "DeploymentOperations"
+ ],
+ "operationId": "DeploymentOperations_List",
+ "description": "Gets a list of deployments operations.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group. The name is case insensitive.",
+ "pattern": "^[-\\w\\._]+$"
+ },
+ {
+ "name": "deploymentName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the deployment."
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32",
+ "description": "Query parameters."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/DeploymentOperationsListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ },
+ "/providers/{resourceProviderNamespace}/operations": {
+ "get": {
+ "tags": [
+ "ResourceProviderOperationDetails"
+ ],
+ "operationId": "ResourceProviderOperationDetails_List",
+ "description": "Gets a list of resource providers.",
+ "parameters": [
+ {
+ "name": "resourceProviderNamespace",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Resource identity."
+ },
+ {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceProviderOperationDetailListResult"
+ }
+ },
+ "204": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ResourceProviderOperationDetailListResult"
+ }
+ }
+ },
+ "x-ms-pageable": {
+ "nextLinkName": "nextLink"
+ }
+ }
+ }
+ },
+ "definitions": {
+ "DeploymentExtendedFilter": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Gets or sets the provisioning state."
+ }
+ },
+ "description": "Deployment filter."
+ },
+ "GenericResourceFilter": {
+ "properties": {
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the resource type."
+ },
+ "tagname": {
+ "type": "string",
+ "description": "Gets or sets the tag name."
+ },
+ "tagvalue": {
+ "type": "string",
+ "description": "Gets or sets the tag value."
+ }
+ },
+ "description": "Resource filter."
+ },
+ "ResourceGroupFilter": {
+ "properties": {
+ "tagName": {
+ "type": "string",
+ "description": "Gets or sets the tag name."
+ },
+ "tagValue": {
+ "type": "string",
+ "description": "Gets or sets the tag value."
+ }
+ },
+ "description": "Resource group filter."
+ },
+ "TemplateLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the template."
+ },
+ "ParametersLink": {
+ "properties": {
+ "uri": {
+ "type": "string",
+ "description": "URI referencing the template."
+ },
+ "contentVersion": {
+ "type": "string",
+ "description": "If included it must match the ContentVersion in the template."
+ }
+ },
+ "required": [
+ "uri"
+ ],
+ "description": "Entity representing the reference to the deployment paramaters."
+ },
+ "DeploymentProperties": {
+ "properties": {
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content. Use only one of Template or TemplateLink."
+ },
+ "templateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
+ },
+ "parameters": {
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ParametersLink",
+ "description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental",
+ "Complete"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ },
+ "debugSetting": {
+ "$ref": "#/definitions/DebugSetting",
+ "description": "Gets or sets the debug setting of the deployment."
+ }
+ },
+ "description": "Deployment properties."
+ },
+ "DebugSetting": {
+ "properties": {
+ "detailLevel": {
+ "x-ms-client-flatten": true,
+ "type": "string",
+ "description": "Gets or sets the debug detail level."
+ }
+ }
+ },
+ "Deployment": {
+ "properties": {
+ "properties": {
+ "$ref": "#/definitions/DeploymentProperties",
+ "description": "Gets or sets the deployment properties."
+ }
+ },
+ "description": "Deployment operation parameters."
+ },
+ "DeploymentExportResult": {
+ "properties": {
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content."
+ }
+ }
+ },
+ "ResourceManagementErrorWithDetails": {
+ "properties": {
+ "code": {
+ "type": "string",
+ "description": "Gets or sets the error code returned from the server."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the error message returned from the server."
+ },
+ "target": {
+ "type": "string",
+ "description": "Gets or sets the target of the error."
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ResourceManagementErrorWithDetails"
+ },
+ "description": "Gets or sets validation error."
+ }
+ },
+ "required": [
+ "code",
+ "message"
+ ]
+ },
+ "ProviderResourceType": {
+ "properties": {
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the resource type."
+ },
+ "locations": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the collection of locations where this resource type can be created in."
+ },
+ "apiVersions": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the api version."
+ },
+ "properties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the properties."
+ }
+ },
+ "description": "Resource type managed by the resource provider."
+ },
+ "Provider": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the provider id."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace of the provider."
+ },
+ "registrationState": {
+ "type": "string",
+ "description": "Gets or sets the registration state of the provider."
+ },
+ "resourceTypes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProviderResourceType"
+ },
+ "description": "Gets or sets the collection of provider resource types."
+ }
+ },
+ "description": "Resource provider information."
+ },
+ "BasicDependency": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "Dependency": {
+ "properties": {
+ "dependsOn": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/BasicDependency"
+ },
+ "description": "Gets the list of dependencies."
+ },
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the dependency."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource type."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the dependency resource name."
+ }
+ },
+ "description": "Deployment dependency information."
+ },
+ "DeploymentPropertiesExtended": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Gets or sets the state of the provisioning."
+ },
+ "correlationId": {
+ "type": "string",
+ "description": "Gets or sets the correlation ID of the deployment."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the timestamp of the template deployment."
+ },
+ "outputs": {
+ "type": "object",
+ "description": "Gets or sets key/value pairs that represent deploymentoutput."
+ },
+ "providers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Provider"
+ },
+ "description": "Gets the list of resource providers needed for the deployment."
+ },
+ "dependencies": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Dependency"
+ },
+ "description": "Gets the list of deployment dependencies."
+ },
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content. Use only one of Template or TemplateLink."
+ },
+ "templateLink": {
+ "$ref": "#/definitions/TemplateLink",
+ "description": "Gets or sets the URI referencing the template. Use only one of Template or TemplateLink."
+ },
+ "parameters": {
+ "type": "object",
+ "description": "Deployment parameters. Use only one of Parameters or ParametersLink."
+ },
+ "parametersLink": {
+ "$ref": "#/definitions/ParametersLink",
+ "description": "Gets or sets the URI referencing the parameters. Use only one of Parameters or ParametersLink."
+ },
+ "mode": {
+ "type": "string",
+ "description": "Gets or sets the deployment mode.",
+ "enum": [
+ "Incremental",
+ "Complete"
+ ],
+ "x-ms-enum": {
+ "name": "DeploymentMode",
+ "modelAsString": false
+ }
+ },
+ "debugSetting": {
+ "$ref": "#/definitions/DebugSetting",
+ "description": "Gets or sets the debug setting of the deployment."
+ }
+ },
+ "description": "Deployment properties with additional details."
+ },
+ "DeploymentValidateResult": {
+ "properties": {
+ "error": {
+ "$ref": "#/definitions/ResourceManagementErrorWithDetails",
+ "description": "Gets or sets validation error."
+ },
+ "properties": {
+ "$ref": "#/definitions/DeploymentPropertiesExtended",
+ "description": "Gets or sets the template deployment properties."
+ }
+ },
+ "description": "Information from validate template deployment response."
+ },
+ "DeploymentExtended": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the deployment."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the deployment."
+ },
+ "properties": {
+ "$ref": "#/definitions/DeploymentPropertiesExtended",
+ "description": "Gets or sets deployment properties."
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "description": "Deployment information."
+ },
+ "DeploymentListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/DeploymentExtended"
+ },
+ "description": "Gets or sets the list of deployments."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "description": "List of deployments."
+ },
+ "ProviderListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Provider"
+ },
+ "description": "Gets or sets the list of resource providers."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "description": "List of resource providers."
+ },
+ "GenericResource": {
+ "properties": {
+ "plan": {
+ "$ref": "#/definitions/Plan",
+ "description": "Gets or sets the plan of the resource."
+ },
+ "properties": {
+ "type": "object",
+ "description": "Gets or sets the resource properties."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "Resource"
+ }
+ ],
+ "description": "Resource information."
+ },
+ "Plan": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the plan ID."
+ },
+ "publisher": {
+ "type": "string",
+ "description": "Gets or sets the publisher ID."
+ },
+ "product": {
+ "type": "string",
+ "description": "Gets or sets the offer ID."
+ },
+ "promotionCode": {
+ "type": "string",
+ "description": "Gets or sets the promotion code."
+ }
+ },
+ "description": "Plan for the resource."
+ },
+ "ResourceListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/GenericResource"
+ },
+ "description": "Gets or sets the list of resource groups."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "required": [
+ "nextLink"
+ ],
+ "description": "List of resource groups."
+ },
+ "ResourceGroup": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Gets the ID of the resource group."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the Name of the resource group."
+ },
+ "properties": {
+ "$ref": "#/definitions/ResourceGroupProperties"
+ },
+ "location": {
+ "type": "string",
+ "description": "Gets or sets the location of the resource group. It cannot be changed after the resource group has been created. Has to be one of the supported Azure Locations, such as West US, East US, West Europe, East Asia, etc."
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the tags attached to the resource group."
+ }
+ },
+ "required": [
+ "location"
+ ],
+ "description": "Resource group information."
+ },
+ "ResourceGroupProperties": {
+ "properties": {
+ "provisioningState": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Gets resource group provisioning state."
+ }
+ },
+ "description": "The resource group properties."
+ },
+ "ResourceGroupListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ResourceGroup"
+ },
+ "description": "Gets or sets the list of resource groups."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "required": [
+ "nextLink"
+ ],
+ "description": "List of resource groups."
+ },
+ "ResourcesMoveInfo": {
+ "properties": {
+ "resources": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the ids of the resources."
+ },
+ "targetResourceGroup": {
+ "type": "string",
+ "description": "The target resource group."
+ }
+ },
+ "description": "Parameters of move resources."
+ },
+ "ExportTemplateRequest": {
+ "properties": {
+ "resources": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Gets or sets the ids of the resources. The only supported string currently is '*' (all resources). Future api updates will support exporting specific resources."
+ },
+ "options": {
+ "type": "string",
+ "description": "The export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments"
+ }
+ },
+ "description": "Export resource group template request parameters."
+ },
+ "TagCount": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Type of count."
+ },
+ "value": {
+ "type": "string",
+ "description": "Value of count."
+ }
+ },
+ "description": "Tag count."
+ },
+ "TagValue": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the tag ID."
+ },
+ "tagValue": {
+ "type": "string",
+ "description": "Gets or sets the tag value."
+ },
+ "count": {
+ "$ref": "#/definitions/TagCount",
+ "description": "Gets or sets the tag value count."
+ }
+ },
+ "description": "Tag information."
+ },
+ "TagDetails": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the tag ID."
+ },
+ "tagName": {
+ "type": "string",
+ "description": "Gets or sets the tag name."
+ },
+ "count": {
+ "$ref": "#/definitions/TagCount",
+ "description": "Gets or sets the tag count."
+ },
+ "values": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TagValue"
+ },
+ "description": "Gets or sets the list of tag values."
+ }
+ },
+ "description": "Tag details."
+ },
+ "TagsListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TagDetails"
+ },
+ "description": "Gets or sets the list of tags."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "required": [
+ "nextLink"
+ ],
+ "description": "List of subscription tags."
+ },
+ "TargetResource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the resource."
+ },
+ "resourceName": {
+ "type": "string",
+ "description": "Gets or sets the name of the resource."
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "Gets or sets the type of the resource."
+ }
+ },
+ "description": "Target resource."
+ },
+ "HttpMessage": {
+ "properties": {
+ "content": {
+ "type": "object",
+ "description": "Gets or sets HTTP message content."
+ }
+ }
+ },
+ "DeploymentOperationProperties": {
+ "properties": {
+ "provisioningState": {
+ "type": "string",
+ "description": "Gets or sets the state of the provisioning."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the date and time of the operation."
+ },
+ "serviceRequestId": {
+ "type": "string",
+ "description": "Gets or sets deployment operation service request id."
+ },
+ "statusCode": {
+ "type": "string",
+ "description": "Gets or sets operation status code."
+ },
+ "statusMessage": {
+ "type": "object",
+ "description": "Gets or sets operation status message."
+ },
+ "targetResource": {
+ "$ref": "#/definitions/TargetResource",
+ "description": "Gets or sets the target resource."
+ },
+ "request": {
+ "$ref": "#/definitions/HttpMessage",
+ "description": "Gets or sets the HTTP request message."
+ },
+ "response": {
+ "$ref": "#/definitions/HttpMessage",
+ "description": "Gets or sets the HTTP response message."
+ }
+ },
+ "description": "Deployment operation properties."
+ },
+ "DeploymentOperation": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets full deployment operation id."
+ },
+ "operationId": {
+ "type": "string",
+ "description": "Gets or sets deployment operation id."
+ },
+ "properties": {
+ "$ref": "#/definitions/DeploymentOperationProperties",
+ "description": "Gets or sets deployment properties."
+ }
+ },
+ "description": "Deployment operation information."
+ },
+ "DeploymentOperationsListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/DeploymentOperation"
+ },
+ "description": "Gets or sets the list of deployments."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of results."
+ }
+ },
+ "description": "List of deployment operations."
+ },
+ "ResourceProviderOperationDisplayProperties": {
+ "properties": {
+ "publisher": {
+ "type": "string",
+ "description": "Gets or sets operation description."
+ },
+ "provider": {
+ "type": "string",
+ "description": "Gets or sets operation provider."
+ },
+ "resource": {
+ "type": "string",
+ "description": "Gets or sets operation resource."
+ },
+ "operation": {
+ "type": "string",
+ "description": "Gets or sets operation."
+ },
+ "description": {
+ "type": "string",
+ "description": "Gets or sets operation description."
+ }
+ },
+ "description": "Resource provider operation's display properties."
+ },
+ "ResourceProviderOperationDefinition": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the provider operation name."
+ },
+ "display": {
+ "$ref": "#/definitions/ResourceProviderOperationDisplayProperties",
+ "description": "Gets or sets the display property of the provider operation."
+ }
+ },
+ "description": "Resource provider operation information."
+ },
+ "ResourceProviderOperationDetailListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ResourceProviderOperationDefinition"
+ },
+ "description": "Gets or sets the list of resource provider operations."
+ }
+ },
+ "description": "List of resource provider operations."
+ },
+ "Resource": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource Id"
+ },
+ "name": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource name"
+ },
+ "type": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource type"
+ },
+ "location": {
+ "type": "string",
+ "description": "Resource location"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Resource tags"
+ }
+ },
+ "required": [
+ "location"
+ ],
+ "x-ms-azure-resource": true
+ },
+ "SubResource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Resource Id"
+ }
+ },
+ "x-ms-azure-resource": true
+ },
+ "ResourceGroupExportResult": {
+ "properties": {
+ "template": {
+ "type": "object",
+ "description": "Gets or sets the template content."
+ },
+ "error": {
+ "$ref": "#/definitions/ResourceManagementErrorWithDetails",
+ "description": "Gets or sets the error."
+ }
+ }
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Scheduler/2016-03-01/scheduler.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Scheduler/2016-03-01/scheduler.json
new file mode 100644
index 000000000000..8b5de980ce5a
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Scheduler/2016-03-01/scheduler.json
@@ -0,0 +1,1567 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "SchedulerManagementClient",
+ "version": "2016-03-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "paths": {
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Scheduler/jobCollections": {
+ "get": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_ListBySubscription",
+ "description": "Gets all job collections under specified subscription.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collections have been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionListResult"
+ }
+ }
+ },
+ "x-ms-pageable": { "nextLinkName": "nextLink" }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections": {
+ "get": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_ListByResourceGroup",
+ "description": "Gets all job collections under specified resource group.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collections have been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionListResult"
+ }
+ }
+ },
+ "x-ms-pageable": { "nextLinkName": "nextLink" }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}": {
+ "get": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_Get",
+ "description": "Gets a job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collection has been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_CreateOrUpdate",
+ "description": "Provisions a new job collection or updates an existing job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "jobCollection",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ },
+ "description": "The job collection definition."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collection has been successfully updated.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ }
+ },
+ "201": {
+ "description": "The job collection has been successfully created.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_Patch",
+ "description": "Patches an existing job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "jobCollection",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ },
+ "description": "The job collection definition."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collection has been successfully patched.",
+ "schema": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_Delete",
+ "description": "Deletes a job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job collection has been successfully deleted."
+ },
+ "202": {
+ "description": "Accepted and the delete job collection operation will complete asynchronously."
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/enable": {
+ "post": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_Enable",
+ "description": "Enables all of the jobs in the job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "All of the jobs in the job collection have been successfully enabled."
+ },
+ "202": {
+ "description": "Accepted and the enable job collection operation will complete asynchronously."
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/disable": {
+ "post": {
+ "tags": [
+ "JobCollections"
+ ],
+ "operationId": "JobCollections_Disable",
+ "description": "Disables all of the jobs in the job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "All of the jobs in the job collection have been successfully disabled."
+ },
+ "202": {
+ "description": "Accepted and the disable job collection operation will complete asynchronously."
+ }
+ },
+ "x-ms-long-running-operation": true
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}": {
+ "get": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_Get",
+ "description": "Gets a job.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_CreateOrUpdate",
+ "description": "Provisions a new job or updates an existing job.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "job",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ },
+ "description": "The job definition."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully updated.",
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ }
+ },
+ "201": {
+ "description": "The job has been successfully created.",
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ }
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_Patch",
+ "description": "Patches an existing job.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "job",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ },
+ "description": "The job definition."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully patched.",
+ "schema": {
+ "$ref": "#/definitions/JobDefinition"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_Delete",
+ "description": "Deletes a job.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully deleted."
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run": {
+ "post": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_Run",
+ "description": "Runs a job.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully run."
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs": {
+ "get": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_List",
+ "description": "Lists all jobs under the specified job collection.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "description": "The number of jobs to request, in the of range [1..100]."
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "description": "The (0-based) index of the job history list from which to begin requesting entries."
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the job state.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job has been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobListResult"
+ }
+ }
+ },
+ "x-ms-pageable": { "nextLinkName": "nextLink" },
+ "x-ms-odata": "#/definitions/JobStateFilter"
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/history": {
+ "get": {
+ "tags": [
+ "Jobs"
+ ],
+ "operationId": "Jobs_ListJobHistory",
+ "description": "Lists job history.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/subscriptionId"
+ },
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The resource group name."
+ },
+ {
+ "name": "jobCollectionName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job collection name."
+ },
+ {
+ "name": "jobName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The job name."
+ },
+ {
+ "$ref": "#/parameters/apiVersion"
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "description": "the number of job history to request, in the of range [1..100]."
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "description": "The (0-based) index of the job history list from which to begin requesting entries."
+ },
+ {
+ "name": "$filter",
+ "description": "The filter to apply on the job state.",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The job histories have been successfully returned.",
+ "schema": {
+ "$ref": "#/definitions/JobHistoryListResult"
+ }
+ }
+ },
+ "x-ms-pageable": { "nextLinkName": "nextLink" },
+ "x-ms-odata": "#/definitions/JobHistoryFilter"
+ }
+ }
+ },
+ "definitions": {
+ "JobCollectionListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "readOnly": true,
+ "items": {
+ "$ref": "#/definitions/JobCollectionDefinition"
+ },
+ "description": "Gets the job collections."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of job collections."
+ }
+ }
+ },
+ "JobListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/JobDefinition"
+ },
+ "description": "Gets or sets all jobs under job collection."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of jobs."
+ }
+ }
+ },
+ "JobHistoryListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/JobHistoryDefinition"
+ },
+ "description": "Gets or sets the job histories under job."
+ },
+ "nextLink": {
+ "type": "string",
+ "description": "Gets or sets the URL to get the next set of job histories."
+ }
+ }
+ },
+ "JobCollectionDefinition": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job collection resource identifier."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job collection resource type."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the job collection resource name."
+ },
+ "location": {
+ "type": "string",
+ "description": "Gets or sets the storage account location."
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the tags."
+ },
+ "properties": {
+ "$ref": "#/definitions/JobCollectionProperties",
+ "description": "Gets or sets the job collection properties."
+ }
+ }
+ },
+ "JobCollectionProperties": {
+ "properties": {
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "Gets or sets the SKU."
+ },
+ "state": {
+ "type": "string",
+ "description": "Gets or sets the state.",
+ "enum": [
+ "Enabled",
+ "Disabled",
+ "Suspended",
+ "Deleted"
+ ],
+ "x-ms-enum": { "name": "JobCollectionState", "modelAsString": false }
+ },
+ "quota": {
+ "$ref": "#/definitions/JobCollectionQuota",
+ "description": "Gets or sets the job collection quota."
+ }
+ }
+ },
+ "Sku": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Gets or set the SKU.",
+ "enum": [
+ "Standard",
+ "Free",
+ "P10Premium",
+ "P20Premium"
+ ],
+ "x-ms-enum": { "name": "SkuDefinition", "modelAsString": false }
+ }
+ }
+ },
+ "JobCollectionQuota": {
+ "properties": {
+ "maxJobCount": {
+ "type": "integer",
+ "description": "Gets or set the maximum job count."
+ },
+ "maxJobOccurrence": {
+ "type": "integer",
+ "description": "Gets or sets the maximum job occurrence."
+ },
+ "maxRecurrence": {
+ "$ref": "#/definitions/JobMaxRecurrence",
+ "description": "Gets or set the maximum recurrence."
+ }
+ }
+ },
+ "JobDefinition": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job resource identifier."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job resource type."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job resource name."
+ },
+ "properties": {
+ "$ref": "#/definitions/JobProperties",
+ "description": "Gets or sets the job properties."
+ }
+ }
+ },
+ "JobProperties": {
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the job start time."
+ },
+ "action": {
+ "$ref": "#/definitions/JobAction",
+ "description": "Gets or sets the job action."
+ },
+ "recurrence": {
+ "$ref": "#/definitions/JobRecurrence",
+ "description": "Gets or sets the job recurrence."
+ },
+ "state": {
+ "$ref": "#/definitions/JobState",
+ "description": "Gets or set the job state."
+ },
+ "status": {
+ "$ref": "#/definitions/JobStatus",
+ "readOnly": true,
+ "description": "Gets the job status."
+ }
+ }
+ },
+ "JobHistoryDefinition": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job history identifier."
+ },
+ "type": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job history resource type."
+ },
+ "name": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job history name."
+ },
+ "properties": {
+ "$ref": "#/definitions/JobHistoryDefinitionProperties",
+ "readOnly": true,
+ "description": "Gets or sets the job history properties."
+ }
+ }
+ },
+ "JobHistoryDefinitionProperties": {
+ "properties": {
+ "startTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the start time for this job."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the end time for this job."
+ },
+ "expectedExecutionTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the expected execution time for this job."
+ },
+ "actionName": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the job history action name.",
+ "enum": [
+ "MainAction",
+ "ErrorAction"
+ ],
+ "x-ms-enum": { "name": "JobHistoryActionName", "modelAsString": false }
+ },
+ "status": {
+ "$ref": "#/definitions/JobExecutionStatus",
+ "readOnly": true,
+ "description": "Gets the job history status."
+ },
+ "message": {
+ "type": "string",
+ "readOnly": true,
+ "description": "Gets the message for the job history."
+ },
+ "retryCount": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Gets the retry count for job."
+ },
+ "repeatCount": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Gets the repeat count for the job."
+ }
+ }
+ },
+ "JobAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the job action type.",
+ "enum": [
+ "Http",
+ "Https",
+ "StorageQueue",
+ "ServiceBusQueue",
+ "ServiceBusTopic"
+ ],
+ "x-ms-enum": { "name": "JobActionType", "modelAsString": false }
+ },
+ "request": {
+ "$ref": "#/definitions/HttpRequest",
+ "description": "Gets or sets the http requests."
+ },
+ "queueMessage": {
+ "$ref": "#/definitions/StorageQueueMessage",
+ "description": "Gets or sets the storage queue message."
+ },
+ "serviceBusQueueMessage": {
+ "$ref": "#/definitions/ServiceBusQueueMessage",
+ "description": "Gets or sets the service bus queue message."
+ },
+ "serviceBusTopicMessage": {
+ "$ref": "#/definitions/ServiceBusTopicMessage",
+ "description": "Gets or sets the service bus topic message."
+ },
+ "retryPolicy": {
+ "$ref": "#/definitions/RetryPolicy",
+ "description": "Gets or sets the retry policy."
+ },
+ "errorAction": {
+ "$ref": "#/definitions/JobErrorAction",
+ "description": "Gets or sets the error action."
+ }
+ }
+ },
+ "JobErrorAction": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the job error action type.",
+ "enum": [
+ "Http",
+ "Https",
+ "StorageQueue",
+ "ServiceBusQueue",
+ "ServiceBusTopic"
+ ],
+ "x-ms-enum": { "name": "JobActionType", "modelAsString": false }
+ },
+ "request": {
+ "$ref": "#/definitions/HttpRequest",
+ "description": "Gets or sets the http requests."
+ },
+ "queueMessage": {
+ "$ref": "#/definitions/StorageQueueMessage",
+ "description": "Gets or sets the storage queue message."
+ },
+ "serviceBusQueueMessage": {
+ "$ref": "#/definitions/ServiceBusQueueMessage",
+ "description": "Gets or sets the service bus queue message."
+ },
+ "serviceBusTopicMessage": {
+ "$ref": "#/definitions/ServiceBusTopicMessage",
+ "description": "Gets or sets the service bus topic message."
+ },
+ "retryPolicy": {
+ "$ref": "#/definitions/RetryPolicy",
+ "description": "Gets or sets the retry policy."
+ }
+ }
+ },
+ "HttpRequest": {
+ "properties": {
+ "authentication": {
+ "$ref": "#/definitions/HttpAuthentication",
+ "description": "Gets or sets the http authentication."
+ },
+ "uri": {
+ "type": "string",
+ "description": "Gets or sets the Uri."
+ },
+ "method": {
+ "type": "string",
+ "description": "Gets or sets the method of the request."
+ },
+ "body": {
+ "type": "string",
+ "description": "Gets or sets the request body."
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the headers."
+ }
+ }
+ },
+ "ClientCertAuthentication": {
+ "properties": {
+ "password": {
+ "type": "string",
+ "description": "Gets or sets the password."
+ },
+ "pfx": {
+ "type": "string",
+ "description": "Gets or sets the pfx."
+ },
+ "certificateThumbprint": {
+ "type": "string",
+ "description": "Gets or sets the certificate thumbprint."
+ },
+ "certificateExpirationDate": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the certificate expiration date."
+ },
+ "certificateSubjectName": {
+ "type": "string",
+ "description": "Gets or sets the certificate subject name."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/HttpAuthentication"
+ }
+ ]
+ },
+ "BasicAuthentication": {
+ "properties": {
+ "username": {
+ "type": "string",
+ "description": "Gets or sets the username."
+ },
+ "password": {
+ "type": "string",
+ "description": "Gets or sets the password."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/HttpAuthentication"
+ }
+ ]
+ },
+ "OAuthAuthentication": {
+ "properties": {
+ "secret": {
+ "type": "string",
+ "description": "Gets or sets the secret."
+ },
+ "tenant": {
+ "type": "string",
+ "description": "Gets or sets the tenant."
+ },
+ "audience": {
+ "type": "string",
+ "description": "Gets or sets the audience."
+ },
+ "clientId": {
+ "type": "string",
+ "description": "Gets or sets the client identifier."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/HttpAuthentication"
+ }
+ ]
+ },
+ "HttpAuthentication": {
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the http authentication type.",
+ "enum": [
+ "NotSpecified",
+ "ClientCertificate",
+ "ActiveDirectoryOAuth",
+ "Basic"
+ ],
+ "x-ms-enum": { "name": "HttpAuthenticationType", "modelAsString": false }
+ }
+ }
+ },
+ "StorageQueueMessage": {
+ "properties": {
+ "storageAccount": {
+ "type": "string",
+ "description": "Gets or sets the storage account name."
+ },
+ "queueName": {
+ "type": "string",
+ "description": "Gets or sets the queue name."
+ },
+ "sasToken": {
+ "type": "string",
+ "description": "Gets or sets the SAS key."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the message."
+ }
+ }
+ },
+ "ServiceBusQueueMessage": {
+ "properties": {
+ "queueName": {
+ "type": "string",
+ "description": "Gets or sets the queue name."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/ServiceBusMessage"
+ }
+ ]
+ },
+ "ServiceBusTopicMessage": {
+ "properties": {
+ "topicPath": {
+ "type": "string",
+ "description": "Gets or sets the topic path."
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/ServiceBusMessage"
+ }
+ ]
+ },
+ "ServiceBusMessage": {
+ "properties": {
+ "authentication": {
+ "$ref": "#/definitions/ServiceBusAuthentication",
+ "description": "Gets or sets the authentication."
+ },
+ "brokeredMessageProperties": {
+ "$ref": "#/definitions/ServiceBusBrokeredMessageProperties",
+ "description": "Gets or sets the brokered message properties."
+ },
+ "customMessageProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Gets or sets the custom message properties."
+ },
+ "message": {
+ "type": "string",
+ "description": "Gets or sets the message."
+ },
+ "namespace": {
+ "type": "string",
+ "description": "Gets or sets the namespace."
+ },
+ "transportType": {
+ "type": "string",
+ "description": "Gets or sets the transport type.",
+ "enum": [
+ "NotSpecified",
+ "NetMessaging",
+ "AMQP"
+ ],
+ "x-ms-enum": { "name": "ServiceBusTransportType", "modelAsString": false }
+ }
+ }
+ },
+ "ServiceBusAuthentication": {
+ "properties": {
+ "sasKey": {
+ "type": "string",
+ "description": "Gets or sets the SAS key."
+ },
+ "sasKeyName": {
+ "type": "string",
+ "description": "Gets or sets the SAS key name."
+ },
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the authentication type.",
+ "enum": [
+ "NotSpecified",
+ "SharedAccessKey"
+ ],
+ "x-ms-enum": { "name": "ServiceBusAuthenticationType", "modelAsString": false }
+ }
+ }
+ },
+ "ServiceBusBrokeredMessageProperties": {
+ "properties": {
+ "contentType": {
+ "type": "string",
+ "description": "Gets or sets the content type."
+ },
+ "correlationId": {
+ "type": "string",
+ "description": "Gets or sets the correlation id."
+ },
+ "forcePersistence": {
+ "type": "boolean",
+ "description": "Gets or sets the force persistence."
+ },
+ "label": {
+ "type": "string",
+ "description": "Gets or sets the label."
+ },
+ "messageId": {
+ "type": "string",
+ "description": "Gets or sets the message id."
+ },
+ "partitionKey": {
+ "type": "string",
+ "description": "Gets or sets the partition key."
+ },
+ "replyTo": {
+ "type": "string",
+ "description": "Gets or sets the reply to."
+ },
+ "replyToSessionId": {
+ "type": "string",
+ "description": "Gets or sets the reply to session id."
+ },
+ "scheduledEnqueueTimeUtc": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the scheduled enqueue time UTC."
+ },
+ "sessionId": {
+ "type": "string",
+ "description": "Gets or sets the session id."
+ },
+ "timeToLive": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the time to live."
+ },
+ "to": {
+ "type": "string",
+ "description": "Gets or sets the to."
+ },
+ "viaPartitionKey": {
+ "type": "string",
+ "description": "Gets or sets the via partition key."
+ }
+ }
+ },
+ "RetryPolicy": {
+ "properties": {
+ "retryType": {
+ "type": "string",
+ "description": "Gets or sets the retry strategy to be used.",
+ "enum": [
+ "None",
+ "Fixed"
+ ],
+ "x-ms-enum": { "name": "RetryType", "modelAsString": false }
+ },
+ "retryInterval": {
+ "type": "string",
+ "format": "duration",
+ "description": "Gets or sets the retry interval between retries."
+ },
+ "retryCount": {
+ "type": "integer",
+ "description": "Gets or sets the number of times a retry should be attempted."
+ }
+ }
+ },
+ "JobMaxRecurrence": {
+ "properties": {
+ "frequency": {
+ "type": "string",
+ "description": "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month).",
+ "enum": [
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month"
+ ],
+ "x-ms-enum": { "name": "RecurrenceFrequency", "modelAsString": false }
+ },
+ "interval": {
+ "type": "integer",
+ "description": "Gets or sets the interval between retries."
+ }
+ }
+ },
+ "JobRecurrence": {
+ "properties": {
+ "frequency": {
+ "type": "string",
+ "description": "Gets or sets the frequency of recurrence (second, minute, hour, day, week, month).",
+ "enum": [
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month"
+ ],
+ "x-ms-enum": { "name": "RecurrenceFrequency", "modelAsString": false }
+ },
+ "interval": {
+ "type": "integer",
+ "description": "Gets or sets the interval between retries."
+ },
+ "count": {
+ "type": "integer",
+ "description": "Gets or sets the maximum number of times that the job should run."
+ },
+ "endTime": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Gets or sets the time at which the job will complete."
+ },
+ "schedule": {
+ "$ref": "#/definitions/JobRecurrenceSchedule"
+ }
+ }
+ },
+ "RecurrenceFrequency": {
+ "type": "string",
+ "description": "Gets or sets the frequency of recurrence (minute, hour, day, week, month).",
+ "enum": [
+ "Minute",
+ "Hour",
+ "Day",
+ "Week",
+ "Month"
+ ],
+ "x-ms-enum": { "name": "RecurrenceFrequency", "modelAsString": false }
+ },
+ "JobRecurrenceSchedule": {
+ "properties": {
+ "weekDays": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday"
+ ],
+ "x-ms-enum": { "name": "DayOfWeek", "modelAsString": false }
+ },
+ "description": "Gets or sets the days of the week that the job should execute on."
+ },
+ "hours": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "Gets or sets the hours of the day that the job should execute at."
+ },
+ "minutes": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "Gets or sets the minutes of the hour that the job should execute at."
+ },
+ "monthDays": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "Gets or sets the days of the month that the job should execute on. Must be between 1 and 31."
+ },
+ "monthlyOccurrences": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/JobRecurrenceScheduleMonthlyOccurrence"
+ },
+ "description": "Gets or sets the occurrences of days within a month."
+ }
+ }
+ },
+ "JobRecurrenceScheduleMonthlyOccurrence": {
+ "properties": {
+ "day": {
+ "type": "string",
+ "description": "Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.",
+ "enum": [
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday"
+ ],
+ "x-ms-enum": { "name": "JobScheduleDay", "modelAsString": false }
+ },
+ "Occurrence": {
+ "type": "integer",
+ "description": "Gets or sets the occurrence. Must be between -5 and 5."
+ }
+ }
+ },
+ "JobStateFilter": {
+ "type": "object",
+ "properties": {
+ "state": {
+ "$ref": "#/definitions/JobState",
+ "description": "Gets or sets the job state."
+ }
+ }
+ },
+ "JobState": {
+ "type": "string",
+ "description": "Gets or set the job state.",
+ "enum": [
+ "Enabled",
+ "Disabled",
+ "Faulted",
+ "Completed"
+ ],
+ "x-ms-enum": { "name": "JobState", "modelAsString": false }
+ },
+ "JobHistoryFilter": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "$ref": "#/definitions/JobExecutionStatus",
+ "description": "Gets or sets the job execution status."
+ }
+ }
+ },
+ "JobExecutionStatus": {
+ "type": "string",
+ "description": "Gets the job execution status.",
+ "enum": [
+ "Completed",
+ "Failed",
+ "Postponed"
+ ],
+ "x-ms-enum": { "name": "JobExecutionStatus", "modelAsString": false }
+ },
+ "JobStatus": {
+ "properties": {
+ "executionCount": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Gets the number of times this job has executed."
+ },
+ "failureCount": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Gets the number of times this job has failed."
+ },
+ "faultedCount": {
+ "type": "integer",
+ "readOnly": true,
+ "description": "Gets the number of faulted occurrences (occurrences that were retried and failed as many times as the retry policy states)."
+ },
+ "lastExecutionTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the time the last occurrence executed in ISO-8601 format. Could be empty if job has not run yet."
+ },
+ "nextExecutionTime": {
+ "type": "string",
+ "format": "date-time",
+ "readOnly": true,
+ "description": "Gets the time of the next occurrence in ISO-8601 format. Could be empty if the job is completed."
+ }
+ }
+ }
+ },
+ "parameters": {
+ "subscriptionId": {
+ "name": "subscriptionId",
+ "description": "The subscription id.",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ "apiVersion": {
+ "name": "api-version",
+ "description": "The API version.",
+ "in": "query",
+ "required": true,
+ "type": "string"
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Search/2015-02-28/search.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Search/2015-02-28/search.json
new file mode 100644
index 000000000000..c1150b8aa740
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Search/2015-02-28/search.json
@@ -0,0 +1,518 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "SearchManagementClient",
+ "description": "Client that can be used to manage Azure Search services and API keys.",
+ "version": "2015-02-28"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "security": [
+ {
+ "azure_auth": [
+ "user_impersonation"
+ ]
+ }
+ ],
+ "securityDefinitions": {
+ "azure_auth": {
+ "type": "oauth2",
+ "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
+ "flow": "implicit",
+ "description": "Azure Active Directory OAuth2 Flow",
+ "scopes": {
+ "user_impersonation": "impersonate your user account"
+ }
+ }
+ },
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listAdminKeys": {
+ "post": {
+ "tags": [
+ "AdminKeys"
+ ],
+ "operationId": "AdminKeys_List",
+ "description": "Returns the primary and secondary API keys for the given Azure Search service.",
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn832685.aspx"
+ },
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group within the current subscription."
+ },
+ {
+ "name": "serviceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Search service for which to list admin keys."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/AdminKeyResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}/listQueryKeys": {
+ "get": {
+ "tags": [
+ "QueryKeys"
+ ],
+ "operationId": "QueryKeys_List",
+ "description": "Returns the list of query API keys for the given Azure Search service.",
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn832701.aspx"
+ },
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group within the current subscription."
+ },
+ {
+ "name": "serviceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Search service for which to list query keys."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ListQueryKeysResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}": {
+ "put": {
+ "tags": [
+ "Services"
+ ],
+ "operationId": "Services_CreateOrUpdate",
+ "description": "Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values.",
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn832687.aspx"
+ },
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group within the current subscription."
+ },
+ {
+ "name": "serviceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Search service to create or update."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/SearchServiceCreateOrUpdateParameters"
+ },
+ "description": "The properties to set or update on the Search service."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/SearchServiceResource"
+ }
+ },
+ "201": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/SearchServiceResource"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Services"
+ ],
+ "operationId": "Services_Delete",
+ "description": "Deletes a Search service in the given resource group, along with its associated resources.",
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn832692.aspx"
+ },
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group within the current subscription."
+ },
+ {
+ "name": "serviceName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Search service to delete."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "404": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices": {
+ "get": {
+ "tags": [
+ "Services"
+ ],
+ "operationId": "Services_List",
+ "description": "Returns a list of all Search services in the given resource group.",
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn832688.aspx"
+ },
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group within the current subscription."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/SearchServiceListResult"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "AdminKeyResult": {
+ "properties": {
+ "primaryKey": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The primary API key of the Search service."
+ },
+ "secondaryKey": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The secondary API key of the Search service."
+ }
+ },
+ "description": "Response containing the primary and secondary API keys for a given Azure Search service."
+ },
+ "QueryKey": {
+ "properties": {
+ "name": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The name of the query API key; may be empty."
+ },
+ "key": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The value of the query API key."
+ }
+ },
+ "description": "Describes an API key for a given Azure Search service that has permissions for query operations only."
+ },
+ "ListQueryKeysResult": {
+ "properties": {
+ "value": {
+ "readOnly": true,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/QueryKey"
+ },
+ "description": "The query keys for the Azure Search service."
+ }
+ },
+ "description": "Response containing the query API keys for a given Azure Search service."
+ },
+ "Sku": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The SKU of the Search service.",
+ "enum": [
+ "free",
+ "standard",
+ "standard2"
+ ],
+ "x-ms-enum": {
+ "name": "SkuType"
+ }
+ }
+ },
+ "description": "Defines the SKU of an Azure Search Service, which determines price tier and capacity limits."
+ },
+ "SearchServiceProperties": {
+ "properties": {
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "The SKU of the Search Service, which determines price tier and capacity limits."
+ },
+ "replicaCount": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The number of replicas in the Search service. If specified, it must be a value between 1 and 6 inclusive."
+ },
+ "partitionCount": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12."
+ }
+ },
+ "description": "Defines properties of an Azure Search service that can be modified."
+ },
+ "SearchServiceCreateOrUpdateParameters": {
+ "properties": {
+ "location": {
+ "type": "string",
+ "description": "The geographic location of the Search service."
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Tags to help categorize the Search service in the Azure Portal."
+ },
+ "properties": {
+ "$ref": "#/definitions/SearchServiceProperties",
+ "description": "Properties of the Search service."
+ }
+ },
+ "description": "Properties that describe an Azure Search service."
+ },
+ "SearchServiceReadableProperties": {
+ "properties": {
+ "status": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The status of the Search service.",
+ "enum": [
+ "running",
+ "provisioning",
+ "deleting",
+ "degraded",
+ "disabled",
+ "error"
+ ],
+ "x-ms-enum": {
+ "name": "SearchServiceStatus"
+ }
+ },
+ "statusDetails": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The details of the Search service status."
+ },
+ "provisioningState": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The state of the last provisioning operation performed on the Search service.",
+ "enum": [
+ "succeeded",
+ "provisioning",
+ "failed"
+ ],
+ "x-ms-enum": {
+ "name": "ProvisioningState"
+ }
+ },
+ "sku": {
+ "$ref": "#/definitions/Sku",
+ "description": "The SKU of the Search Service, which determines price tier and capacity limits."
+ },
+ "replicaCount": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The number of replicas in the Search service. If specified, it must be a value between 1 and 6 inclusive."
+ },
+ "partitionCount": {
+ "type": "integer",
+ "format": "int32",
+ "description": "The number of partitions in the Search service; if specified, it can be 1, 2, 3, 4, 6, or 12."
+ }
+ },
+ "description": "Defines all the properties of an Azure Search service."
+ },
+ "SearchServiceResource": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "The resource Id of the Azure Search service."
+ },
+ "name": {
+ "externalDocs": {
+ "url": "https://msdn.microsoft.com/library/azure/dn857353.aspx"
+ },
+ "type": "string",
+ "description": "The name of the Search service."
+ },
+ "location": {
+ "type": "string",
+ "description": "The geographic location of the Search service."
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Tags to help categorize the Search service in the Azure Portal."
+ },
+ "properties": {
+ "readOnly": true,
+ "$ref": "#/definitions/SearchServiceReadableProperties",
+ "description": "Properties of the Search service."
+ }
+ },
+ "description": "Describes an Azure Search service and its current state."
+ },
+ "SearchServiceListResult": {
+ "properties": {
+ "value": {
+ "readOnly": true,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SearchServiceResource"
+ },
+ "description": "The Search services in the resource group."
+ }
+ },
+ "description": "Response containing a list of Azure Search services for a given resource group."
+ },
+ "Resource": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource Id"
+ },
+ "name": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource name"
+ },
+ "type": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource type"
+ },
+ "location": {
+ "type": "string",
+ "description": "Resource location"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Resource tags"
+ }
+ },
+ "required": [
+ "location"
+ ],
+ "x-ms-external": true
+ },
+ "SubResource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Resource Id"
+ }
+ },
+ "x-ms-external": true
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/TrafficManager/2015-11-01/trafficmanager.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/TrafficManager/2015-11-01/trafficmanager.json
new file mode 100644
index 000000000000..b3e743833e35
--- /dev/null
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/TrafficManager/2015-11-01/trafficmanager.json
@@ -0,0 +1,773 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "TrafficManagerManagementClient",
+ "version": "2015-11-01"
+ },
+ "host": "management.azure.com",
+ "schemes": [
+ "https"
+ ],
+ "consumes": [
+ "application/json",
+ "text/json"
+ ],
+ "produces": [
+ "application/json",
+ "text/json"
+ ],
+ "paths": {
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}": {
+ "patch": {
+ "tags": [
+ "Endpoints"
+ ],
+ "operationId": "Endpoints_Update",
+ "description": "Update a Traffic Manager endpoint.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager endpoint to be updated."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "endpointType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The type of the Traffic Manager endpoint to be updated."
+ },
+ {
+ "name": "endpointName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager endpoint to be updated."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ },
+ "description": "The Traffic Manager endpoint parameters supplied to the Update operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The updated Traffic Manager endpoint.",
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ }
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Endpoints"
+ ],
+ "operationId": "Endpoints_Get",
+ "description": "Gets a Traffic Manager endpoint.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager endpoint."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "endpointType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The type of the Traffic Manager endpoint."
+ },
+ {
+ "name": "endpointName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager endpoint."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The Traffic Manager endpoint.",
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Endpoints"
+ ],
+ "operationId": "Endpoints_CreateOrUpdate",
+ "description": "Create or update a Traffic Manager endpoint.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager endpoint to be created or updated."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "endpointType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The type of the Traffic Manager endpoint to be created or updated."
+ },
+ {
+ "name": "endpointName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager endpoint to be created or updated."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ },
+ "description": "The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The created or updated Endpoint.",
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ }
+ },
+ "201": {
+ "description": "The created or updated Endpoint.",
+ "schema": {
+ "$ref": "#/definitions/Endpoint"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Endpoints"
+ ],
+ "operationId": "Endpoints_Delete",
+ "description": "Deletes a Traffic Manager endpoint.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager endpoint to be deleted."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "endpointType",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The type of the Traffic Manager endpoint to be deleted."
+ },
+ {
+ "name": "endpointName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager endpoint to be deleted."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ }
+ },
+ "/providers/Microsoft.Network/checkTrafficManagerNameAvailability": {
+ "post": {
+ "tags": [
+ "Profiles"
+ ],
+ "operationId": "Profiles_CheckTrafficManagerRelativeDnsNameAvailability",
+ "description": "Checks the availability of a Traffic Manager Relative DNS name.",
+ "parameters": [
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CheckTrafficManagerRelativeDnsNameAvailabilityParameters"
+ },
+ "description": "The Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/TrafficManagerNameAvailability"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles": {
+ "get": {
+ "tags": [
+ "Profiles"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "operationId": "Profiles_ListAllInResourceGroup",
+ "description": "Lists all Traffic Manager profiles within a resource group.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager profiles to be listed."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ProfileListResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles": {
+ "get": {
+ "tags": [
+ "Profiles"
+ ],
+ "x-ms-pageable": {
+ "nextLinkName": null
+ },
+ "operationId": "Profiles_ListAll",
+ "description": "Lists all Traffic Manager profiles within a subscription.",
+ "parameters": [
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/ProfileListResult"
+ }
+ }
+ }
+ }
+ },
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}": {
+ "get": {
+ "tags": [
+ "Profiles"
+ ],
+ "operationId": "Profiles_Get",
+ "description": "Gets a Traffic Manager profile.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager profile."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The Traffic Manager profile.",
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Profiles"
+ ],
+ "operationId": "Profiles_CreateOrUpdate",
+ "description": "Create or update a Traffic Manager profile.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager profile."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ },
+ "description": "The Traffic Manager profile parameters supplied to the CreateOrUpdate operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The created or updated Traffic Manager profile.",
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ }
+ },
+ "201": {
+ "description": "The created or updated Traffic Manager profile.",
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ }
+ }
+ }
+ },
+ "delete": {
+ "tags": [
+ "Profiles"
+ ],
+ "operationId": "Profiles_Delete",
+ "description": "Deletes a Traffic Manager profile.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager profile to be deleted."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile to be deleted."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": ""
+ },
+ "204": {
+ "description": ""
+ }
+ }
+ },
+ "patch": {
+ "tags": [
+ "Profiles"
+ ],
+ "operationId": "Profiles_Update",
+ "description": "Update a Traffic Manager profile.",
+ "parameters": [
+ {
+ "name": "resourceGroupName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the resource group containing the Traffic Manager profile."
+ },
+ {
+ "name": "profileName",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "The name of the Traffic Manager profile."
+ },
+ {
+ "name": "parameters",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ },
+ "description": "The Traffic Manager profile parameters supplied to the Update operation."
+ },
+ {
+ "$ref": "#/parameters/ApiVersionParameter"
+ },
+ {
+ "$ref": "#/parameters/SubscriptionIdParameter"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The updated Traffic Manager profile.",
+ "schema": {
+ "$ref": "#/definitions/Profile"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "EndpointProperties": {
+ "properties": {
+ "targetResourceId": {
+ "type": "string",
+ "description": "Gets or sets the Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'."
+ },
+ "target": {
+ "type": "string",
+ "description": "Gets or sets the fully-qualified DNS name of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint."
+ },
+ "endpointStatus": {
+ "type": "string",
+ "description": "Gets or sets the status of the endpoint.. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values are 'Enabled' and 'Disabled'."
+ },
+ "weight": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000."
+ },
+ "priority": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the priority of this endpoint when using the ‘Priority’ traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value."
+ },
+ "endpointLocation": {
+ "type": "string",
+ "description": "Specifies the location of the external or nested endpoints when using the ‘Performance’ traffic routing method."
+ },
+ "endpointMonitorStatus": {
+ "type": "string",
+ "description": "Gets or sets the monitoring status of the endpoint."
+ },
+ "minChildEndpoints": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'."
+ }
+ },
+ "description": "Class respresenting a Traffic Manager endpoint properties."
+ },
+ "Endpoint": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Gets or sets the ID of the Traffic Manager endpoint."
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the Traffic Manager endpoint."
+ },
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the endpoint type of the Traffic Manager endpoint."
+ },
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/EndpointProperties"
+ }
+ },
+ "description": "Class respresenting a Traffic Manager endpoint."
+ },
+ "CheckTrafficManagerRelativeDnsNameAvailabilityParameters": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Gets or sets the name of the resource."
+ },
+ "type": {
+ "type": "string",
+ "description": "Gets or sets the type of the resource."
+ }
+ },
+ "description": "Parameters supplied to check Traffic Manager name operation."
+ },
+ "DnsConfig": {
+ "properties": {
+ "relativeName": {
+ "type": "string",
+ "description": "Gets or sets the relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the profile."
+ },
+ "fqdn": {
+ "type": "string",
+ "description": "Gets or sets the fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS domain used by Azure Traffic Manager."
+ },
+ "ttl": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the DNS Ttime-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile."
+ }
+ },
+ "description": "Class containing DNS settings in a Traffic Manager profile."
+ },
+ "MonitorConfig": {
+ "properties": {
+ "profileMonitorStatus": {
+ "type": "string",
+ "description": "Gets or sets the profile-level monitoring status of the Traffic Manager profile."
+ },
+ "protocol": {
+ "type": "string",
+ "description": "Gets or sets the protocol (HTTP or HTTPS) used to probe for endpoint health."
+ },
+ "port": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Gets or sets the TCP port used to probe for endpoint health."
+ },
+ "path": {
+ "type": "string",
+ "description": "Gets or sets the path relative to the endpoint domain name used to probe for endpoint health."
+ }
+ },
+ "description": "Class containing endpoint monitoring settings in a Traffic Manager profile."
+ },
+ "ProfileProperties": {
+ "properties": {
+ "profileStatus": {
+ "type": "string",
+ "description": "Gets or sets the status of the Traffic Manager profile. Possible values are 'Enabled' and 'Disabled'."
+ },
+ "trafficRoutingMethod": {
+ "type": "string",
+ "description": "Gets or sets the traffic routing method of the Traffic Manager profile. Possible values are 'Performance', 'Weighted', or 'Priority'."
+ },
+ "dnsConfig": {
+ "$ref": "#/definitions/DnsConfig",
+ "description": "Gets or sets the DNS settings of the Traffic Manager profile."
+ },
+ "monitorConfig": {
+ "$ref": "#/definitions/MonitorConfig",
+ "description": "Gets or sets the endpoint monitoring settings of the Traffic Manager profile."
+ },
+ "endpoints": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Endpoint"
+ },
+ "description": "Gets or sets the list of endpoints in the Traffic Manager profile."
+ }
+ },
+ "description": "Class representing the Traffic Manager profile properties."
+ },
+ "Profile": {
+ "properties": {
+ "properties": {
+ "x-ms-client-flatten": true,
+ "$ref": "#/definitions/ProfileProperties"
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "Resource"
+ }
+ ],
+ "description": "Class representing a Traffic Manager profile."
+ },
+ "ProfileListResult": {
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Profile"
+ },
+ "description": "Gets the list of Traffic manager profiles."
+ }
+ },
+ "description": "The list Traffic Manager profiles operation response."
+ },
+ "TrafficManagerNameAvailability": {
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The relative name."
+ },
+ "type": {
+ "type": "string",
+ "description": "Traffic Manager profile resource type."
+ },
+ "nameAvailable": {
+ "type": "boolean",
+ "description": "Describes whether the relative name is available or not."
+ },
+ "reason": {
+ "type": "string",
+ "description": "The reason why the name is not available, when applicable."
+ },
+ "message": {
+ "type": "string",
+ "description": "Descriptive message that explains why the name is not available, when applicable."
+ }
+ },
+ "description": "Class representing a Traffic Manager Name Availability response."
+ },
+ "Resource": {
+ "properties": {
+ "id": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource Id"
+ },
+ "name": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource name"
+ },
+ "type": {
+ "readOnly": true,
+ "type": "string",
+ "description": "Resource type"
+ },
+ "location": {
+ "type": "string",
+ "description": "Resource location"
+ },
+ "tags": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Resource tags"
+ }
+ },
+ "x-ms-azure-resource": true
+ },
+ "SubResource": {
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Resource Id"
+ }
+ },
+ "x-ms-external": true
+ }
+ },
+ "parameters": {
+ "SubscriptionIdParameter": {
+ "name": "subscriptionId",
+ "in": "path",
+ "required": true,
+ "type": "string",
+ "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
+ },
+ "ApiVersionParameter": {
+ "name": "api-version",
+ "in": "query",
+ "required": true,
+ "type": "string",
+ "description": "Client Api Version."
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/JsonSchema.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/JsonSchema.cs
index 98fb128331fb..c2981c23ac17 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/JsonSchema.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/JsonSchema.cs
@@ -16,7 +16,7 @@ public class JsonSchema
private IList enumList;
private IDictionary properties;
private IList requiredList;
- private IList resources;
+ private IList oneOfList;
///
/// A reference to the location in the parent schema where this schema's definition can be
@@ -83,6 +83,16 @@ public string ResourceType
}
}
+ ///
+ /// The minimum value that a numeric value matching this schema can have.
+ ///
+ public double? Minimum { get; set; }
+
+ ///
+ /// The maximum value that a numeric value matching this schema can have.
+ ///
+ public double? Maximum { get; set; }
+
///
/// The schema that matches additional properties that have not been specified in the
/// Properties dictionary.
@@ -98,6 +108,14 @@ public IList Enum
get { return enumList; }
}
+ ///
+ /// The list of oneOf options that exist for this JSON schema.
+ ///
+ public IList OneOf
+ {
+ get { return oneOfList; }
+ }
+
///
/// The schemas that describe the properties of a matching JSON value.
///
@@ -114,14 +132,6 @@ public IList Required
get { return requiredList; }
}
- ///
- /// The child resources that are allowed for this JsonSchema.
- ///
- public IList Resources
- {
- get { return resources; }
- }
-
///
/// Add a new value (or values) to this JsonSchema's enum list. This JsonSchema (with the
/// new value(s)) is then returned so that additional changes can be chained together.
@@ -222,7 +232,7 @@ public JsonSchema AddRequired(string requiredPropertyName, params string[] extra
{
if (Properties == null || !Properties.ContainsKey(requiredPropertyName))
{
- throw new ArgumentException("No property exists with the provided requiredPropertyName (" + requiredPropertyName + ")", "requiredPropertyName");
+ throw new ArgumentException("No property exists with the provided requiredPropertyName (" + requiredPropertyName + ")", nameof(requiredPropertyName));
}
if (requiredList == null)
@@ -256,22 +266,23 @@ public JsonSchema AddRequired(string requiredPropertyName, params string[] extra
}
///
- /// Add a child resource schema to this JsonSchema.
+ /// Add the provided JSON schema as an option for the oneOf property of this JSON schema.
///
- /// The child resource schema to add to this JsonSchema.
+ ///
///
- public JsonSchema AddResource(JsonSchema childResourceSchema)
+ public JsonSchema AddOneOf(JsonSchema oneOfOption)
{
- if (childResourceSchema == null)
+ if (oneOfOption == null)
{
- throw new ArgumentNullException("childResourceSchema");
+ throw new ArgumentNullException(nameof(oneOfOption));
}
- if (resources == null)
+ if (oneOfList == null)
{
- resources = new List();
+ oneOfList = new List();
}
- resources.Add(childResourceSchema);
+
+ oneOfList.Add(oneOfOption);
return this;
}
@@ -288,10 +299,12 @@ public JsonSchema Clone()
result.Description = Description;
result.JsonType = JsonType;
result.AdditionalProperties = Clone(AdditionalProperties);
+ result.Minimum = Minimum;
+ result.Maximum = Maximum;
result.enumList = Clone(Enum);
result.properties = Clone(Properties);
result.requiredList = Clone(Required);
- result.resources = Clone(Resources);
+ result.oneOfList = Clone(OneOf);
return result;
}
@@ -365,7 +378,9 @@ public override bool Equals(object obj)
Equals(Enum, rhs.Enum) &&
Equals(Properties, rhs.Properties) &&
Equals(Required, rhs.Required) &&
- Equals(Description, rhs.Description);
+ Equals(Description, rhs.Description) &&
+ Equals(Minimum, rhs.Minimum) &&
+ Equals(Maximum, rhs.Maximum);
}
return result;
@@ -382,7 +397,9 @@ public override int GetHashCode()
GetHashCode(Enum) ^
GetHashCode(Properties) ^
GetHashCode(Required) ^
- GetHashCode(Description);
+ GetHashCode(Description) ^
+ GetHashCode(Minimum) ^
+ GetHashCode(Maximum);
}
private static int GetHashCode(object value)
@@ -440,5 +457,19 @@ private static bool Equals(IDictionary lhs, IDictionary Parse(ServiceClient serviceCli
{
if (serviceClient == null)
{
- throw new ArgumentNullException("serviceClient");
+ throw new ArgumentNullException(nameof(serviceClient));
}
- IDictionary result = new Dictionary();
+ string apiVersion = serviceClient.ApiVersion;
+ if (string.IsNullOrWhiteSpace(apiVersion))
+ {
+ throw new ArgumentException("No API version is provided in the swagger document.");
+ }
+
+ Dictionary resourceSchemas = new Dictionary();
- List createResourceMethods = new List();
foreach (Method method in serviceClient.Methods)
{
- if (IsCreateResourceMethod(method))
+ if (method.HttpMethod != HttpMethod.Put ||
+ method.ReturnType.Body == null ||
+ !(method.ReturnType.Body is CompositeType) ||
+ string.IsNullOrWhiteSpace(method.Url) ||
+ !method.Url.StartsWith(resourceMethodPrefix, StringComparison.OrdinalIgnoreCase) ||
+ !method.Url.EndsWith("}", StringComparison.OrdinalIgnoreCase))
{
- createResourceMethods.Add(method);
+ continue;
}
- }
-
- string apiVersion = serviceClient.ApiVersion;
- foreach (Method createResourceMethod in createResourceMethods)
- {
- string afterPrefix = createResourceMethod.Url.Substring(resourceMethodPrefix.Length);
+ string afterPrefix = method.Url.Substring(resourceMethodPrefix.Length);
int forwardSlashIndexAfterProvider = afterPrefix.IndexOf('/');
string resourceProvider = afterPrefix.Substring(0, forwardSlashIndexAfterProvider);
+ if (IsPathVariable(resourceProvider))
+ {
+ // If the resourceProvider is a path variable, such as {someValue}, then this
+ // is not a create resource method. Skip it.
+ continue;
+ }
+
ResourceSchema resourceSchema;
- if (!result.ContainsKey(resourceProvider))
+ if (!resourceSchemas.ContainsKey(resourceProvider))
{
resourceSchema = new ResourceSchema();
-
- if (apiVersion != null)
- {
- resourceSchema.Id = string.Format(CultureInfo.InvariantCulture, "http://schema.management.azure.com/schemas/{0}/{1}.json#", apiVersion, resourceProvider);
- }
-
+ resourceSchema.Id = string.Format(CultureInfo.InvariantCulture, "http://schema.management.azure.com/schemas/{0}/{1}.json#", apiVersion, resourceProvider);
resourceSchema.Title = resourceProvider;
resourceSchema.Description = resourceProvider.Replace('.', ' ') + " Resource Types";
resourceSchema.Schema = "http://json-schema.org/draft-04/schema#";
- result.Add(resourceProvider, resourceSchema);
+ resourceSchemas.Add(resourceProvider, resourceSchema);
}
else
{
- resourceSchema = result[resourceProvider];
+ resourceSchema = resourceSchemas[resourceProvider];
}
string methodUrlPathAfterProvider = afterPrefix.Substring(forwardSlashIndexAfterProvider + 1);
- string[] resourceTypes = GetResourceTypes(resourceProvider, methodUrlPathAfterProvider, createResourceMethod.Parameters);
+ string[] resourceTypes = ParseResourceTypes(resourceProvider, methodUrlPathAfterProvider, method);
foreach (string resourceType in resourceTypes)
{
JsonSchema resourceDefinition = new JsonSchema();
resourceDefinition.JsonType = "object";
- resourceDefinition.AddProperty("type", new JsonSchema() { JsonType = "string" }.AddEnum(resourceType), true);
+ resourceDefinition.AddProperty("type", JsonSchema.CreateStringEnum(resourceType), true);
+ resourceDefinition.AddProperty("apiVersion", JsonSchema.CreateStringEnum(apiVersion), true);
- if (!string.IsNullOrWhiteSpace(apiVersion))
+ if (method.Body != null)
{
- resourceDefinition.AddProperty("apiVersion", new JsonSchema() { JsonType = "string" }.AddEnum(apiVersion), true);
- }
-
- if (createResourceMethod.Body != null)
- {
- CompositeType body = createResourceMethod.Body.Type as CompositeType;
+ CompositeType body = method.Body.Type as CompositeType;
Debug.Assert(body != null, "The create resource method's body must be a CompositeType and cannot be null.");
if (body != null)
{
@@ -94,7 +97,7 @@ public static IDictionary Parse(ServiceClient serviceCli
{
if (!resourceDefinition.Properties.Keys.Contains(property.Name))
{
- JsonSchema propertyDefinition = ParseProperty(property, resourceSchema.Definitions);
+ JsonSchema propertyDefinition = ParseType(property, property.Type, resourceSchema.Definitions, serviceClient.ModelTypes);
if (propertyDefinition != null)
{
resourceDefinition.AddProperty(property.Name, propertyDefinition, property.IsRequired || property.Name == "properties");
@@ -117,7 +120,7 @@ public static IDictionary Parse(ServiceClient serviceCli
// this until we're done adding all resources as top level resources, though, because
// it's possible that we will parse a child resource before we parse the parent
// resource.
- foreach (ResourceSchema resourceSchema in result.Values)
+ foreach (ResourceSchema resourceSchema in resourceSchemas.Values)
{
// By iterating over the reverse order of the defined resource definitions, I'm
// counting on the resource definitions being in sorted order. That way I'm
@@ -136,13 +139,28 @@ public static IDictionary Parse(ServiceClient serviceCli
if (parentResourceDefinition != null)
{
string childResourceType = resourceType.Substring(lastSlashIndex + 1);
-
JsonSchema childResourceDefinition = resourceDefinition.Clone();
childResourceDefinition.ResourceType = childResourceType;
+
string childResourceDefinitionPropertyName = string.Join("_", resourcePropertyName, "childResource");
resourceSchema.AddDefinition(childResourceDefinitionPropertyName, childResourceDefinition);
- parentResourceDefinition.AddResource(new JsonSchema()
+ JsonSchema childResources;
+ if (parentResourceDefinition.Properties.ContainsKey("resources"))
+ {
+ childResources = parentResourceDefinition.Properties["resources"];
+ }
+ else
+ {
+ childResources = new JsonSchema()
+ {
+ JsonType = "array",
+ Items = new JsonSchema()
+ };
+ parentResourceDefinition.AddProperty("resources", childResources);
+ }
+
+ childResources.Items.AddOneOf(new JsonSchema()
{
Ref = "#/definitions/" + childResourceDefinitionPropertyName,
});
@@ -150,112 +168,124 @@ public static IDictionary Parse(ServiceClient serviceCli
}
}
- return result;
+ return resourceSchemas;
}
- private static JsonSchema ParseProperty(Property property, IDictionary definitionMap)
+ private static string[] ParseResourceTypes(string resourceProvider, string methodUrlPathAfterProvider, Method method)
{
- JsonSchema propertyDefinition = null;
-
- if (!property.IsReadOnly)
+ // Gather the list of resource types defined by this method url. Usually this will
+ // result in only one resource type, but if the method url contains an enumerated
+ // resource type parameter, then multiple resource types could be declared from a
+ // single method url.
+ List resourceTypes = new List();
+ resourceTypes.Add(resourceProvider);
+ string[] pathSegments = methodUrlPathAfterProvider.Split(new char[] { '/' });
+ for (int i = 0; i < pathSegments.Length; i += 2)
{
- propertyDefinition = new JsonSchema();
+ string pathSegment = pathSegments[i];
+ if (IsPathVariable(pathSegment))
+ {
+ string parameterName = pathSegment.Substring(1, pathSegment.Length - 2);
+ Parameter parameter = method.Parameters.FirstOrDefault(methodParameter => methodParameter.Name == parameterName);
+ if (parameter == null)
+ {
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Found undefined parameter reference {0} in create resource method \"{1}/{2}/{3}\".", pathSegment, resourceMethodPrefix, resourceProvider, methodUrlPathAfterProvider));
+ }
+
+ if (parameter.Type == null)
+ {
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Parameter reference {0} has no defined type.", pathSegment));
+ }
+
+ EnumType parameterType = parameter.Type as EnumType;
+ if (parameterType == null)
+ {
+ // If we encounter a parameter in the URL that isn't an enumeration, then
+ // we can't create a resource from this URL.
+ resourceTypes.Clear();
+ break;
+ }
+
+ if (parameterType.Values == null || parameterType.Values.Count == 0)
+ {
+ string errorMessage = string.Format(CultureInfo.CurrentCulture, "Parameter reference {0} is defined as an enum type, but it doesn't have any specified values.", pathSegment);
+ throw new ArgumentException(errorMessage);
+ }
+
+ List newResourceTypes = new List();
+ foreach (string resourceType in resourceTypes)
+ {
+ foreach (EnumValue parameterValue in parameterType.Values)
+ {
+ newResourceTypes.Add(string.Join("/", resourceType, parameterValue.Name));
+ }
+ }
+
+ resourceTypes = newResourceTypes;
+ }
+ else
+ {
+ for (int j = 0; j < resourceTypes.Count; ++j)
+ {
+ resourceTypes[j] = string.Join("/", resourceTypes[j], pathSegment);
+ }
+ }
+ }
- IType propertyType = property.Type;
+ return resourceTypes.ToArray();
+ }
+
+ private static JsonSchema ParseType(Property property, IType type, IDictionary definitions, IEnumerable modelTypes)
+ {
+ JsonSchema result = null;
- CompositeType compositeType = propertyType as CompositeType;
+ if (property == null || !property.IsReadOnly)
+ {
+ // A schema that matches a JSON object with specific properties, such as
+ // { "name": { "type": "string" }, "age": { "type": "number" } }
+ CompositeType compositeType = type as CompositeType;
if (compositeType != null)
{
- propertyDefinition = ParseCompositeType(compositeType, definitionMap);
- propertyDefinition.Description = property.Documentation;
+ result = ParseCompositeType(property, compositeType, definitions, modelTypes);
}
else
{
- DictionaryType dictionaryType = propertyType as DictionaryType;
+ // A schema that matches a "dictionary" JSON object, such as
+ // { "additionalProperties": { "type": "string" } }
+ DictionaryType dictionaryType = type as DictionaryType;
if (dictionaryType != null)
{
- propertyDefinition.JsonType = "object";
- propertyDefinition.Description = property.Documentation;
-
- PrimaryType dictionaryPrimaryType = dictionaryType.ValueType as PrimaryType;
- if (dictionaryPrimaryType != null)
- {
- propertyDefinition.AdditionalProperties = ParsePrimaryType(dictionaryPrimaryType);
- }
- else
- {
- CompositeType dictionaryCompositeType = dictionaryType.ValueType as CompositeType;
- if (dictionaryCompositeType != null)
- {
- propertyDefinition.AdditionalProperties = ParseCompositeType(dictionaryCompositeType, definitionMap);
- }
- else
- {
- Debug.Assert(false, "Unrecognized DictionaryType.ValueType: " + dictionaryType.ValueType.GetType());
- }
- }
+ result = ParseDictionaryType(property, dictionaryType, definitions, modelTypes);
}
else
{
- EnumType enumType = propertyType as EnumType;
+ // A schema that matches a single value from a given set of values, such as
+ // { "enum": [ "a", "b" ] }
+ EnumType enumType = type as EnumType;
if (enumType != null)
{
- propertyDefinition = ParseEnumType(enumType);
- propertyDefinition.Description = property.Documentation;
+ result = ParseEnumType(property, enumType);
}
else
{
- PrimaryType primaryType = propertyType as PrimaryType;
+ // A schema that matches simple values, such as { "type": "number" }
+ PrimaryType primaryType = type as PrimaryType;
if (primaryType != null)
{
- propertyDefinition = ParsePrimaryType(primaryType);
- propertyDefinition.Description = property.Documentation;
- propertyDefinition.Format = primaryType.Format;
-
- if (property.DefaultValue != null)
- {
- propertyDefinition.AddEnum(property.DefaultValue);
- }
+ result = ParsePrimaryType(property, primaryType);
}
else
{
- SequenceType sequenceType = propertyType as SequenceType;
+ // A schema that matches an array of values, such as
+ // { "items": { "type": "number" } }
+ SequenceType sequenceType = type as SequenceType;
if (sequenceType != null)
{
- propertyDefinition.JsonType = "array";
- propertyDefinition.Description = property.Documentation;
-
- IType sequenceElementType = sequenceType.ElementType;
-
- CompositeType sequenceCompositeType = sequenceElementType as CompositeType;
- if (sequenceCompositeType != null)
- {
- propertyDefinition.Items = ParseCompositeType(sequenceCompositeType, definitionMap);
- }
- else
- {
- PrimaryType sequencePrimaryType = sequenceElementType as PrimaryType;
- if (sequencePrimaryType != null)
- {
- propertyDefinition.Items = ParsePrimaryType(sequencePrimaryType);
- }
- else
- {
- EnumType sequenceEnumType = sequenceElementType as EnumType;
- if (sequenceEnumType != null)
- {
- propertyDefinition = ParseEnumType(sequenceEnumType);
- }
- else
- {
- Debug.Assert(false, "Unrecognized SequenceType.ElementType: " + sequenceType.ElementType.GetType());
- }
- }
- }
+ result = ParseSequenceType(property, sequenceType, definitions, modelTypes);
}
else
{
- Debug.Assert(false, "Unrecognized property type: " + propertyType.GetType());
+ Debug.Fail("Unrecognized property type: " + type.GetType());
}
}
}
@@ -263,55 +293,141 @@ private static JsonSchema ParseProperty(Property property, IDictionary definitionMap)
+ private static JsonSchema ParseCompositeType(Property property, CompositeType compositeType, IDictionary definitions, IEnumerable modelTypes)
{
- JsonSchema result = new JsonSchema();
-
string definitionName = compositeType.Name;
- if (!definitionMap.ContainsKey(definitionName))
+ if (!definitions.ContainsKey(definitionName))
{
- JsonSchema definition = new JsonSchema();
- definitionMap.Add(definitionName, definition);
+ JsonSchema definition = new JsonSchema()
+ {
+ JsonType = "object",
+ Description = compositeType.Documentation
+ };
- definition.JsonType = "object";
+ // This definition must be added to the definition map before we start parsing
+ // its properties because its properties may recursively reference back to this
+ // definition.
+ definitions.Add(definitionName, definition);
foreach (Property subProperty in compositeType.ComposedProperties)
{
- JsonSchema subPropertyDefinition = ParseProperty(subProperty, definitionMap);
+ JsonSchema subPropertyDefinition = ParseType(subProperty, subProperty.Type, definitions, modelTypes);
if (subPropertyDefinition != null)
{
definition.AddProperty(subProperty.Name, subPropertyDefinition, subProperty.IsRequired);
}
}
- definition.Description = compositeType.Documentation;
+ string discriminatorPropertyName = compositeType.PolymorphicDiscriminator;
+ if (!string.IsNullOrWhiteSpace(discriminatorPropertyName))
+ {
+ CompositeType[] subTypes = modelTypes.Where(modelType => modelType.BaseModelType == compositeType).ToArray();
+ if (subTypes != null && subTypes.Length > 0)
+ {
+ JsonSchema discriminatorDefinition = new JsonSchema()
+ {
+ JsonType = "string"
+ };
+
+ if (subTypes.Length == 1)
+ {
+ CompositeType subType = subTypes[0];
+ if (subType != null)
+ {
+ foreach (Property subTypeProperty in subType.Properties)
+ {
+ JsonSchema subTypePropertyDefinition = ParseType(subTypeProperty, subTypeProperty.Type, definitions, modelTypes);
+ if (subTypePropertyDefinition != null)
+ {
+ definition.AddProperty(subTypeProperty.Name, subTypePropertyDefinition, subTypeProperty.IsRequired);
+ }
+ }
+
+ const string discriminatorValueExtensionName = "x-ms-discriminator-value";
+ if (subType.ComposedExtensions.ContainsKey(discriminatorValueExtensionName))
+ {
+ string discriminatorValue = subType.ComposedExtensions[discriminatorValueExtensionName] as string;
+ if (!string.IsNullOrWhiteSpace(discriminatorValue))
+ {
+ discriminatorDefinition.AddEnum(discriminatorValue);
+ }
+ }
+ }
+
+ definition.AddProperty(discriminatorPropertyName, discriminatorDefinition);
+ }
+ else
+ {
+ string errorMessage = string.Format(
+ CultureInfo.CurrentCulture,
+ "Multiple sub-types ({0}) of a polymorphic discriminated type ({1}) are not currently supported.",
+ string.Join(", ", subTypes.Select(subType => subType.Name)),
+ compositeType.Name);
+ throw new NotSupportedException(errorMessage);
+ }
+ }
+ }
+ }
+
+ JsonSchema result = new JsonSchema()
+ {
+ Ref = "#/definitions/" + definitionName
+ };
+
+ if (property != null)
+ {
+ result.Description = RemovePossibleValuesFromDescription(property.Documentation);
}
- result.Ref = "#/definitions/" + definitionName;
+ return result;
+ }
+
+ private static JsonSchema ParseDictionaryType(Property property, DictionaryType dictionaryType, IDictionary definitions, IEnumerable modelTypes)
+ {
+ JsonSchema result = new JsonSchema()
+ {
+ JsonType = "object",
+ AdditionalProperties = ParseType(null, dictionaryType.ValueType, definitions, modelTypes)
+ };
+
+ if (property != null)
+ {
+ result.Description = RemovePossibleValuesFromDescription(property.Documentation);
+ }
return result;
}
- private static JsonSchema ParseEnumType(EnumType enumType)
+ private static JsonSchema ParseEnumType(Property property, EnumType enumType)
{
- JsonSchema result = new JsonSchema();
+ JsonSchema result = new JsonSchema()
+ {
+ JsonType = "string"
+ };
- result.JsonType = "string";
foreach (EnumValue enumValue in enumType.Values)
{
result.AddEnum(enumValue.Name);
}
+ if (property != null)
+ {
+ result.Description = RemovePossibleValuesFromDescription(property.Documentation);
+ }
+
return result;
}
- private static JsonSchema ParsePrimaryType(PrimaryType primaryType)
+ private static JsonSchema ParsePrimaryType(Property property, PrimaryType primaryType)
{
- JsonSchema result = new JsonSchema();
+ JsonSchema result = new JsonSchema()
+ {
+ Format = primaryType.Format
+ };
switch (primaryType.Type)
{
@@ -334,6 +450,7 @@ private static JsonSchema ParsePrimaryType(PrimaryType primaryType)
case KnownPrimaryType.DateTime:
case KnownPrimaryType.String:
+ case KnownPrimaryType.TimeSpan:
result.JsonType = "string";
break;
@@ -342,112 +459,84 @@ private static JsonSchema ParsePrimaryType(PrimaryType primaryType)
break;
}
+ if (property != null)
+ {
+ result.Description = property.Documentation;
+
+ if (property.DefaultValue != null)
+ {
+ result.AddEnum(property.DefaultValue);
+ }
+
+ if (property.Constraints.Count > 0)
+ {
+ foreach (KeyValuePair entry in property.Constraints)
+ {
+ switch (entry.Key)
+ {
+ case Constraint.InclusiveMinimum:
+ Debug.Assert(result.JsonType == "integer" || result.JsonType == "number", "Expected to only find an InclusiveMinimum constraint on an integer or number property.");
+ result.Minimum = Double.Parse(entry.Value, CultureInfo.CurrentCulture);
+ break;
+
+ case Constraint.InclusiveMaximum:
+ Debug.Assert(result.JsonType == "integer" || result.JsonType == "number", "Expected to only find an InclusiveMaximum constraint on an integer or number property.");
+ result.Maximum = Double.Parse(entry.Value, CultureInfo.CurrentCulture);
+ break;
+
+ default:
+ Debug.Fail("Unrecognized property Constraint: " + entry.Key);
+ break;
+ }
+ }
+ }
+ }
+
return result;
}
- ///
- /// Determine whether the provided method object represents an Azure REST API that would
- /// create an Azure resource.
- ///
- ///
- ///
- public static bool IsCreateResourceMethod(Method method)
+ private static JsonSchema ParseSequenceType(Property property, SequenceType sequenceType, IDictionary definitions, IEnumerable modelTypes)
{
- if (method == null)
+ JsonSchema result = new JsonSchema()
{
- throw new ArgumentNullException("method");
- }
-
- bool result = false;
+ JsonType = "array",
+ Items = ParseType(null, sequenceType.ElementType, definitions, modelTypes)
+ };
- if (!string.IsNullOrWhiteSpace(method.Url) &&
- method.Url.StartsWith(resourceMethodPrefix, StringComparison.Ordinal) &&
- method.Url.EndsWith("}", StringComparison.Ordinal) && // Only methods that end with the resource's name ({name}) are resource create methods.
- method.HttpMethod == HttpMethod.Put &&
- method.ReturnType.Body != null)
+ if (property != null)
{
- result = method.ReturnType.Body is CompositeType;
+ result.Description = RemovePossibleValuesFromDescription(property.Documentation);
}
return result;
}
+
///
- /// Get the resource type from the provided resourceProvider and the portion of the method
- /// URL path that comes after the resourceProvider section.
+ /// AutoRest has no way of indicating that you don't want Enum properties to have a
+ /// "Possible values include: ..." string appended at the end of their descriptions. This
+ /// function removes the "Possible values" suffix if it exists.
///
- ///
- ///
- ///
+ /// The description to remove the "Possible values" suffix from.
///
- public static string[] GetResourceTypes(string resourceProvider, string methodPathAfterProvider, IReadOnlyCollection createResourceMethodParameters)
+ private static string RemovePossibleValuesFromDescription(string description)
{
- if (string.IsNullOrWhiteSpace(resourceProvider))
+ if (!string.IsNullOrEmpty(description))
{
- throw new ArgumentException("resourceProvider cannot be null or whitespace", "resourceProvider");
- }
- if (string.IsNullOrWhiteSpace(methodPathAfterProvider))
- {
- throw new ArgumentException("methodPathAfterProvider cannot be null or whitespace", "methodPathAfterProvider");
- }
-
- List resourceTypes = new List();
- resourceTypes.Add(resourceProvider);
-
- string[] pathSegments = methodPathAfterProvider.Split(new char[] { '/' });
- for (int i = 0; i < pathSegments.Length; i += 2)
- {
- string pathSegment = pathSegments[i];
- if (pathSegment.StartsWith("{", StringComparison.Ordinal) && pathSegment.EndsWith("}", StringComparison.Ordinal))
- {
- string parameterName = pathSegment.Substring(1, pathSegment.Length - 2);
- Parameter parameter = createResourceMethodParameters.FirstOrDefault(methodParameter => methodParameter.Name == parameterName);
- if (parameter == null)
- {
- string errorMessage = string.Format(CultureInfo.CurrentCulture, "Found undefined parameter reference {0} in create resource method \"{1}/{2}/{3}\".", pathSegment, resourceMethodPrefix, resourceProvider, methodPathAfterProvider);
- throw new ArgumentException(errorMessage, "createResourceMethodParameters");
- }
-
- if (parameter.Type == null)
- {
- string errorMessage = string.Format(CultureInfo.CurrentCulture, "Parameter reference {0} has no defined type.", pathSegment);
- throw new ArgumentException(errorMessage, "createResourceMethodParameters");
- }
-
- EnumType parameterType = parameter.Type as EnumType;
- if (parameterType == null)
- {
- string errorMessage = string.Format(CultureInfo.CurrentCulture, "Parameter reference {0} is defined as a type other than an EnumType: {1}", pathSegment, parameter.Type.GetType().Name);
- throw new ArgumentException(errorMessage, "createResourceMethodParameters");
- }
-
- if (parameterType.Values == null || parameterType.Values.Count == 0)
- {
- string errorMessage = string.Format(CultureInfo.CurrentCulture, "Parameter reference {0} is defined as an EnumType, but it doesn't have any specified values.", pathSegment);
- throw new ArgumentException(errorMessage, "createResourceMethodParameters");
- }
-
- List newResourceTypes = new List();
- foreach (string resourceType in resourceTypes)
- {
- foreach (EnumValue parameterValue in parameterType.Values)
- {
- newResourceTypes.Add(string.Join("/", resourceType, parameterValue.Name));
- }
- }
-
- resourceTypes = newResourceTypes;
- }
- else
+ int possibleValuesIndex = description.IndexOf("Possible values include: ", StringComparison.OrdinalIgnoreCase);
+ if (possibleValuesIndex > -1)
{
- for (int j = 0; j < resourceTypes.Count; ++j)
- {
- resourceTypes[j] = string.Join("/", resourceTypes[j], pathSegment);
- }
+ description = description.Substring(0, possibleValuesIndex).TrimEnd();
}
}
+ return description;
+ }
- return resourceTypes.ToArray();
+ private static bool IsPathVariable(string pathSegment)
+ {
+ Debug.Assert(pathSegment != null);
+
+ return pathSegment.StartsWith("{", StringComparison.Ordinal) && pathSegment.EndsWith("}", StringComparison.Ordinal);
}
}
}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
index cd5fc23e9d62..c89f3f490a67 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
@@ -76,11 +76,13 @@ private static void WriteDefinitionMap(JsonWriter writer, string definitionMapNa
JsonSchema definition = definitionMap[definitionName];
bool shouldAddExpressionReference = addExpressionReferences &&
- (definition.JsonType != "string" ||
- (definition.Enum != null &&
- definition.Enum.Count() > 0 &&
- definitionName != "type" &&
- definitionName != "apiVersion"));
+ (definition.JsonType != "string" ||
+ (definition.Enum != null &&
+ definition.Enum.Count() > 0 &&
+ definitionName != "type" &&
+ definitionName != "apiVersion")) &&
+ (definition.JsonType != "array" ||
+ (definitionName != "resources"));
if (!shouldAddExpressionReference)
{
@@ -144,13 +146,15 @@ private static void WriteDefinition(JsonWriter writer, JsonSchema definition)
writer.WriteStartObject();
WriteProperty(writer, "type", definition.JsonType);
+ WriteProperty(writer, "minimum", definition.Minimum);
+ WriteProperty(writer, "maximum", definition.Maximum);
WriteStringArray(writer, "enum", definition.Enum);
+ WriteDefinitionArray(writer, "oneOf", definition.OneOf);
WriteProperty(writer, "format", definition.Format);
WriteProperty(writer, "$ref", definition.Ref);
WriteDefinition(writer, "items", definition.Items);
WriteDefinition(writer, "additionalProperties", definition.AdditionalProperties);
WriteDefinitionMap(writer, "properties", definition.Properties, addExpressionReferences: true);
- WriteDefinitionArray(writer, "resources", definition.Resources);
WriteStringArray(writer, "required", definition.Required);
WriteProperty(writer, "description", definition.Description);
@@ -176,24 +180,13 @@ private static void WriteDefinitionArray(JsonWriter writer, string arrayName, IE
if (arrayDefinitions != null && arrayDefinitions.Count() > 0)
{
writer.WritePropertyName(arrayName);
- writer.WriteStartObject();
-
- WriteProperty(writer, "type", "array");
-
- writer.WritePropertyName("items");
- writer.WriteStartObject();
- writer.WritePropertyName("oneOf");
writer.WriteStartArray();
foreach (JsonSchema definition in arrayDefinitions)
{
WriteDefinition(writer, definition);
}
writer.WriteEndArray();
-
- writer.WriteEndObject();
-
- writer.WriteEndObject();
}
}
@@ -214,5 +207,33 @@ public static void WriteProperty(JsonWriter writer, string propertyName, string
writer.WriteValue(propertyValue);
}
}
+
+ public static void WriteProperty(JsonWriter writer, string propertyName, double? propertyValue)
+ {
+ if (writer == null)
+ {
+ throw new ArgumentNullException("writer");
+ }
+ if (string.IsNullOrWhiteSpace(propertyName))
+ {
+ throw new ArgumentException("propertyName cannot be null or whitespace", "propertyName");
+ }
+
+ if (propertyValue != null)
+ {
+ writer.WritePropertyName(propertyName);
+
+ double doubleValue = propertyValue.Value;
+ long longValue = (long)doubleValue;
+ if (doubleValue == longValue)
+ {
+ writer.WriteValue(longValue);
+ }
+ else
+ {
+ writer.WriteValue(doubleValue);
+ }
+ }
+ }
}
}