diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs index 2f0bd92c6b..15400bc596 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AcceptanceTests.cs @@ -14,50 +14,56 @@ public static class AcceptanceTests [Fact] public static void Storage() { - RunSwaggerTest("storage.json", "Storage"); + RunSwaggerTest("Storage", "2016-01-01", "storage.json"); } [Fact] public static void Batch() { - RunSwaggerTest("BatchManagement.json", "Batch"); + RunSwaggerTest("Batch", "2015-12-01", "BatchManagement.json"); } [Fact] public static void Cdn() { - RunSwaggerTest("cdn.json", "CDN"); + RunSwaggerTest("CDN", "2016-04-02", "cdn.json"); } [Fact] public static void Compute() { - RunSwaggerTest("compute.json", "Compute"); + RunSwaggerTest("Compute", "2016-03-30", "compute.json"); } [Fact] - public static void Dns() + public static void Dns_2015_05_04_preview() { - RunSwaggerTest("dns.json", "DNS"); + RunSwaggerTest("DNS", "2015-05-04-preview", "dns.json"); + } + + [Fact] + public static void Dns_2016_04_01() + { + RunSwaggerTest("DNS", "2016-04-01", "dns.json"); } [Fact] public static void Network() { - RunSwaggerTest("network.json", "Network"); + RunSwaggerTest("Network", "2016-03-30", "network.json"); } [Fact] public static void Web() { - RunSwaggerTest("web.json", "Web"); + RunSwaggerTest("Web", "2015-08-01", "web.json"); } - private static void RunSwaggerTest(string swaggerFileName, string expectedFolderName) + private static void RunSwaggerTest(string resourceType, string apiVersion, string swaggerFileName) { SwaggerSpecHelper.RunTests( - Path.Combine("Swagger", swaggerFileName), - Path.Combine("Expected", expectedFolderName)); + Path.Combine("Swagger", resourceType, apiVersion, swaggerFileName), + Path.Combine("Expected", resourceType, apiVersion)); } } } 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 f765120e4e..2aef930f99 100644 --- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/AutoRest.Generator.AzureResourceSchema.Tests.csproj @@ -78,55 +78,61 @@ - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + + PreserveNewest + + PreserveNewest PreserveNewest - + + PreserveNewest + + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/2015-12-01/Microsoft.Batch.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/2016-04-02/Microsoft.Cdn.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/2016-03-30/Microsoft.Compute.json 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 new file mode 100644 index 0000000000..87fab4f947 --- /dev/null +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2015-05-04-preview/Microsoft.Network.json @@ -0,0 +1,1134 @@ +{ + "id": "http://schema.management.azure.com/schemas/2015-05-04-preview/Microsoft.Network.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.Network", + "description": "Microsoft Network Resource Types", + "resourceDefinitions": { + "dnszones": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the zone that is being updated, as received from a Get operation." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/ZoneProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "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" + } + ] + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones" + }, + "dnszones_A": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/A" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/A" + }, + "dnszones_AAAA": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/AAAA" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/AAAA" + }, + "dnszones_CNAME": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/CNAME" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/CNAME" + }, + "dnszones_MX": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/MX" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/MX" + }, + "dnszones_NS": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/NS" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/NS" + }, + "dnszones_PTR": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/PTR" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/PTR" + }, + "dnszones_SOA": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/SOA" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/SOA" + }, + "dnszones_SRV": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/SRV" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/SRV" + }, + "dnszones_TXT": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Microsoft.Network/dnszones/TXT" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/TXT" + } + }, + "definitions": { + "AaaaRecord": { + "type": "object", + "properties": { + "ipv6Address": { + "type": "string", + "description": "Gets or sets the IPv6 address of this AAAA record in string notation." + } + }, + "description": "An AAAA record." + }, + "ARecord": { + "type": "object", + "properties": { + "ipv4Address": { + "type": "string", + "description": "Gets or sets the IPv4 address of this A record in string notation." + } + }, + "description": "An A record." + }, + "CnameRecord": { + "type": "object", + "properties": { + "cname": { + "type": "string", + "description": "Gets or sets the canonical name for this record without a terminating dot." + } + }, + "description": "A CNAME record." + }, + "dnszones_A_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "A" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/A" + }, + "dnszones_AAAA_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "AAAA" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/AAAA" + }, + "dnszones_CNAME_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "CNAME" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/CNAME" + }, + "dnszones_MX_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MX" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/MX" + }, + "dnszones_NS_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "NS" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/NS" + }, + "dnszones_PTR_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "PTR" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/PTR" + }, + "dnszones_SOA_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "SOA" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/SOA" + }, + "dnszones_SRV_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "SRV" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/SRV" + }, + "dnszones_TXT_childResource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "TXT" + ] + }, + "apiVersion": { + "type": "string", + "enum": [ + "2015-05-04-preview" + ] + }, + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/RecordSetProperties" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the properties of the RecordSet." + } + }, + "required": [ + "type", + "apiVersion", + "properties" + ], + "description": "Microsoft.Network/dnszones/TXT" + }, + "MxRecord": { + "type": "object", + "properties": { + "preference": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the preference metric for this record." + }, + "exchange": { + "type": "string", + "description": "Gets or sets the domain name of the mail host, without a terminating dot." + } + }, + "description": "An MX record." + }, + "NsRecord": { + "type": "object", + "properties": { + "nsdname": { + "type": "string", + "description": "Gets or sets the name server name for this record, without a terminating dot." + } + }, + "description": "An NS record." + }, + "PtrRecord": { + "type": "object", + "properties": { + "ptrdname": { + "type": "string", + "description": "Gets or sets the PTR target domain name for this record without a terminating dot." + } + }, + "description": "A PTR record." + }, + "RecordSetProperties": { + "type": "object", + "properties": { + "TTL": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the TTL of the records in the RecordSet." + }, + "ARecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ARecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of A records in the RecordSet." + }, + "AAAARecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/AaaaRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of AAAA records in the RecordSet." + }, + "MXRecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/MxRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of MX records in the RecordSet." + }, + "NSRecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NsRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of NS records in the RecordSet." + }, + "PTRRecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/PtrRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of PTR records in the RecordSet." + }, + "SRVRecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/SrvRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of SRV records in the RecordSet." + }, + "TXTRecords": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/TxtRecord" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the list of TXT records in the RecordSet." + }, + "CNAMERecord": { + "oneOf": [ + { + "$ref": "#/definitions/CnameRecord" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the CNAME record in the RecordSet." + }, + "SOARecord": { + "oneOf": [ + { + "$ref": "#/definitions/SoaRecord" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the SOA record in the RecordSet." + } + }, + "description": "Represents the properties of the records in the RecordSet." + }, + "SoaRecord": { + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "Gets or sets the domain name of the authoritative name server, without a temrinating dot." + }, + "email": { + "type": "string", + "description": "Gets or sets the email for this record." + }, + "serialNumber": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the serial number for this record." + }, + "refreshTime": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the refresh value for this record." + }, + "retryTime": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the retry time for this record." + }, + "expireTime": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the expire time for this record." + }, + "minimumTTL": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the minimum TTL value for this record." + } + }, + "description": "An SOA record." + }, + "SrvRecord": { + "type": "object", + "properties": { + "priority": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the priority metric for this record." + }, + "weight": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the weight metric for this this record." + }, + "port": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the port of the service for this record." + }, + "target": { + "type": "string", + "description": "Gets or sets the domain name of the target for this record, without a terminating dot." + } + }, + "description": "An SRV record." + }, + "TxtRecord": { + "type": "object", + "properties": { + "value": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the text value of this record." + } + }, + "description": "A TXT record." + }, + "ZoneProperties": { + "type": "object", + "properties": { + "maxNumberOfRecordSets": { + "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 record sets that can be created in this zone." + }, + "numberOfRecordSets": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression" + } + ], + "description": "Gets or sets the current number of record sets in this zone." + } + }, + "description": "Represents the properties of the zone." + } + } +} diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/Microsoft.Network.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/DNS/2016-04-01/Microsoft.Network.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/2016-03-30/Microsoft.Network.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/2016-01-01/Microsoft.Storage.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.CertificateRegistration.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.DomainRegistration.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/2015-08-01/Microsoft.Web.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/BatchManagement.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Batch/2015-12-01/BatchManagement.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/BatchManagement.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Batch/2015-12-01/BatchManagement.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/CDN/2016-04-02/cdn.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/cdn.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/CDN/2016-04-02/cdn.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Compute/2016-03-30/compute.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/compute.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Compute/2016-03-30/compute.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/DNS/2015-05-04-preview/dns.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/DNS/2015-05-04-preview/dns.json new file mode 100644 index 0000000000..5dd62af6df --- /dev/null +++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/DNS/2015-05-04-preview/dns.json @@ -0,0 +1,980 @@ +{ + "swagger": "2.0", + "info": { + "title": "DnsManagementClient", + "description": "Client for managing DNS zones and record.", + "version": "2015-05-04-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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}/{relativeRecordSetName}": { + "put": { + "tags": [ + "RecordSets" + ], + "operationId": "RecordSets_CreateOrUpdate", + "description": "Creates a RecordSet within a DNS zone.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "name": "recordType", + "in": "path", + "required": true, + "type": "string", + "description": "The type of DNS record.", + "enum": [ + "A", + "AAAA", + "CNAME", + "MX", + "NS", + "PTR", + "SOA", + "SRV", + "TXT" + ], + "x-ms-enum": { + "name": "RecordType" + } + }, + { + "name": "relativeRecordSetName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the RecordSet, relative to the name of the zone.", + "x-ms-skip-url-encoding": true + }, + { + "name": "If-Match", + "in": "header", + "type": "string", + "description": "The etag of RecordSet." + }, + { + "name": "If-None-Match", + "in": "header", + "type": "string", + "description": "Defines the If-None-Match condition. Set to '*' to force Create-If-Not-Exist. Other values will be ignored." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RecordSet" + }, + "description": "Parameters supplied to the CreateOrUpdate operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RecordSet" + } + }, + "202": { + "description": "" + } + } + }, + "delete": { + "tags": [ + "RecordSets" + ], + "operationId": "RecordSets_Delete", + "description": "Removes a RecordSet from a DNS zone.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "name": "recordType", + "in": "path", + "required": true, + "type": "string", + "description": "The type of DNS record.", + "enum": [ + "A", + "AAAA", + "CNAME", + "MX", + "NS", + "PTR", + "SOA", + "SRV", + "TXT" + ], + "x-ms-enum": { + "name": "RecordType" + } + }, + { + "name": "relativeRecordSetName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the RecordSet, relative to the name of the zone.", + "x-ms-skip-url-encoding": true + }, + { + "name": "If-Match", + "in": "header", + "type": "string", + "description": "Defines the If-Match condition. The delete operation will be performed only if the ETag of the zone on the server matches this value." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "" + } + } + }, + "get": { + "tags": [ + "RecordSets" + ], + "operationId": "RecordSets_Get", + "description": "Gets a RecordSet.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "name": "recordType", + "in": "path", + "required": true, + "type": "string", + "description": "The type of DNS record.", + "enum": [ + "A", + "AAAA", + "CNAME", + "MX", + "NS", + "PTR", + "SOA", + "SRV", + "TXT" + ], + "x-ms-enum": { + "name": "RecordType" + } + }, + { + "name": "relativeRecordSetName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the RecordSet, relative to the name of the zone.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RecordSet" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/{recordType}": { + "get": { + "tags": [ + "RecordSets" + ], + "operationId": "RecordSets_List", + "description": "Lists the RecordSets of a specified type in a DNS zone.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group that contains the zone." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone from which to enumerate RecordsSets." + }, + { + "name": "recordType", + "in": "path", + "required": true, + "type": "string", + "description": "The type of record sets to enumerate.", + "enum": [ + "A", + "AAAA", + "CNAME", + "MX", + "NS", + "PTR", + "SOA", + "SRV", + "TXT" + ], + "x-ms-enum": { + "name": "RecordType" + } + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "string", + "description": "Query parameters. If null is passed returns the default number of zones." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RecordSetListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RecordSet" + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}/recordsets": { + "get": { + "tags": [ + "RecordSets" + ], + "operationId": "RecordSets_ListAll", + "description": "Lists all RecordSets in a DNS zone.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group that contains the zone." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone from which to enumerate RecordSets." + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "string", + "description": "Query parameters. If null is passed returns the default number of zones." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/RecordSetListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RecordSet" + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones/{zoneName}": { + "put": { + "tags": [ + "Zones" + ], + "operationId": "Zones_CreateOrUpdate", + "description": "Creates a DNS zone within a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "name": "If-Match", + "in": "header", + "type": "string", + "description": "The etag of Zone." + }, + { + "name": "If-None-Match", + "in": "header", + "type": "string", + "description": "Defines the If-None-Match condition. Set to '*' to force Create-If-Not-Exist. Other values will be ignored." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Zone" + }, + "description": "Parameters supplied to the CreateOrUpdate operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Zone" + } + }, + "202": { + "description": "" + } + } + }, + "delete": { + "tags": [ + "Zones" + ], + "operationId": "Zones_Delete", + "description": "Removes a DNS zone from a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "name": "If-Match", + "in": "header", + "type": "string", + "description": "Defines the If-Match condition. The delete operation will be performed only if the ETag of the zone on the server matches this value." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "" + } + } + }, + "get": { + "tags": [ + "Zones" + ], + "operationId": "Zones_Get", + "description": "Gets a DNS zone.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "zoneName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the zone without a terminating dot." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/Zone" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnszones": { + "get": { + "tags": [ + "Zones" + ], + "operationId": "Zones_ListZonesInResourceGroup", + "description": "Lists the DNS zones within a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "$top", + "in": "query", + "required": false, + "type": "string", + "description": "Query parameters. If null is passed returns the default number of zones." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ZoneListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/Zone" + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones": { + "get": { + "tags": [ + "Zones" + ], + "operationId": "Zones_ListZonesInSubscription", + "description": "Lists the DNS zones within a resource group.", + "parameters": [ + { + "name": "$top", + "in": "query", + "required": false, + "type": "string", + "description": "Query parameters. If null is passed returns the default number of zones." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ZoneListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/Zone" + } + } + }, + "definitions": { + "ARecord": { + "properties": { + "ipv4Address": { + "type": "string", + "description": "Gets or sets the IPv4 address of this A record in string notation." + } + }, + "description": "An A record." + }, + "AaaaRecord": { + "properties": { + "ipv6Address": { + "type": "string", + "description": "Gets or sets the IPv6 address of this AAAA record in string notation." + } + }, + "description": "An AAAA record." + }, + "MxRecord": { + "properties": { + "preference": { + "type": "integer", + "format": "int32", + "description": "Gets or sets the preference metric for this record." + }, + "exchange": { + "type": "string", + "description": "Gets or sets the domain name of the mail host, without a terminating dot." + } + }, + "description": "An MX record." + }, + "NsRecord": { + "properties": { + "nsdname": { + "type": "string", + "description": "Gets or sets the name server name for this record, without a terminating dot." + } + }, + "description": "An NS record." + }, + "PtrRecord": { + "properties": { + "ptrdname": { + "type": "string", + "description": "Gets or sets the PTR target domain name for this record without a terminating dot." + } + }, + "description": "A PTR record." + }, + "SrvRecord": { + "properties": { + "priority": { + "type": "integer", + "format": "int32", + "description": "Gets or sets the priority metric for this record." + }, + "weight": { + "type": "integer", + "format": "int32", + "description": "Gets or sets the weight metric for this this record." + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Gets or sets the port of the service for this record." + }, + "target": { + "type": "string", + "description": "Gets or sets the domain name of the target for this record, without a terminating dot." + } + }, + "description": "An SRV record." + }, + "TxtRecord": { + "properties": { + "value": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the text value of this record." + } + }, + "description": "A TXT record." + }, + "CnameRecord": { + "properties": { + "cname": { + "type": "string", + "description": "Gets or sets the canonical name for this record without a terminating dot." + } + }, + "description": "A CNAME record." + }, + "SoaRecord": { + "properties": { + "host": { + "type": "string", + "description": "Gets or sets the domain name of the authoritative name server, without a temrinating dot." + }, + "email": { + "type": "string", + "description": "Gets or sets the email for this record." + }, + "serialNumber": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the serial number for this record." + }, + "refreshTime": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the refresh value for this record." + }, + "retryTime": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the retry time for this record." + }, + "expireTime": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the expire time for this record." + }, + "minimumTTL": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the minimum TTL value for this record." + } + }, + "description": "An SOA record." + }, + "RecordSetProperties": { + "properties": { + "TTL": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the TTL of the records in the RecordSet." + }, + "ARecords": { + "type": "array", + "items": { + "$ref": "#/definitions/ARecord" + }, + "description": "Gets or sets the list of A records in the RecordSet." + }, + "AAAARecords": { + "type": "array", + "items": { + "$ref": "#/definitions/AaaaRecord" + }, + "description": "Gets or sets the list of AAAA records in the RecordSet." + }, + "MXRecords": { + "type": "array", + "items": { + "$ref": "#/definitions/MxRecord" + }, + "description": "Gets or sets the list of MX records in the RecordSet." + }, + "NSRecords": { + "type": "array", + "items": { + "$ref": "#/definitions/NsRecord" + }, + "description": "Gets or sets the list of NS records in the RecordSet." + }, + "PTRRecords": { + "type": "array", + "items": { + "$ref": "#/definitions/PtrRecord" + }, + "description": "Gets or sets the list of PTR records in the RecordSet." + }, + "SRVRecords": { + "type": "array", + "items": { + "$ref": "#/definitions/SrvRecord" + }, + "description": "Gets or sets the list of SRV records in the RecordSet." + }, + "TXTRecords": { + "type": "array", + "items": { + "$ref": "#/definitions/TxtRecord" + }, + "description": "Gets or sets the list of TXT records in the RecordSet." + }, + "CNAMERecord": { + "$ref": "#/definitions/CnameRecord", + "description": "Gets or sets the CNAME record in the RecordSet." + }, + "SOARecord": { + "$ref": "#/definitions/SoaRecord", + "description": "Gets or sets the SOA record in the RecordSet." + } + }, + "description": "Represents the properties of the records in the RecordSet." + }, + "RecordSet": { + "properties": { + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the RecordSet." + }, + "properties": { + "$ref": "#/definitions/RecordSetProperties", + "description": "Gets or sets the properties of the RecordSet." + } + }, + "allOf": [ + { + "$ref": "Resource" + } + ], + "description": "Describes a DNS RecordSet (a set of DNS records with the same name and type)." + }, + "RecordSetListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RecordSet" + }, + "description": "Gets or sets information about the RecordSets in the response." + }, + "nextLink": { + "type": "string", + "description": "Gets or sets the continuation token for the next page." + } + }, + "description": "The response to a RecordSet List operation." + }, + "ZoneProperties": { + "properties": { + "maxNumberOfRecordSets": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the maximum number of record sets that can be created in this zone." + }, + "numberOfRecordSets": { + "type": "integer", + "format": "int64", + "description": "Gets or sets the current number of record sets in this zone." + } + }, + "description": "Represents the properties of the zone." + }, + "Zone": { + "properties": { + "etag": { + "type": "string", + "description": "Gets or sets the ETag of the zone that is being updated, as received from a Get operation." + }, + "properties": { + "$ref": "#/definitions/ZoneProperties", + "description": "Gets or sets the properties of the zone." + } + }, + "allOf": [ + { + "$ref": "Resource" + } + ], + "description": "Describes a DNS zone." + }, + "ZoneListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Zone" + }, + "description": "Gets or sets information about the zones in the response." + }, + "nextLink": { + "type": "string", + "description": "Gets or sets the continuation token for the next page." + } + }, + "description": "The response to a Zone List or ListAll 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-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/dns.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/DNS/2016-04-01/dns.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/dns.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/DNS/2016-04-01/dns.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Network/2016-03-30/network.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/network.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Network/2016-03-30/network.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Storage/2016-01-01/storage.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/storage.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Storage/2016-01-01/storage.json diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/web.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Web/2015-08-01/web.json similarity index 100% rename from AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/web.json rename to AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Swagger/Web/2015-08-01/web.json