diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json
index e35a69c99b6cc..0353b66107559 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Batch/Microsoft.Batch.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Batch",
"description": "Microsoft Batch Resource Types",
"resourceDefinitions": {
- "Microsoft.Batch_batchAccounts": {
+ "batchAccounts": {
"type": "object",
"properties": {
"type": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json
index bf7c8c6821a9e..9f56f516c85c2 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/CDN/Microsoft.Cdn.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Cdn",
"description": "Microsoft Cdn Resource Types",
"resourceDefinitions": {
- "Microsoft.Cdn_profiles": {
+ "profiles": {
"type": "object",
"properties": {
"type": {
@@ -54,7 +54,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Cdn_profiles_endpoints_childResource"
+ "$ref": "#/definitions/profiles_endpoints_childResource"
}
]
}
@@ -67,7 +67,7 @@
],
"description": "Microsoft.Cdn/profiles"
},
- "Microsoft.Cdn_profiles_endpoints": {
+ "profiles_endpoints": {
"type": "object",
"properties": {
"type": {
@@ -116,10 +116,10 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Cdn_profiles_endpoints_customDomains_childResource"
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Cdn_profiles_endpoints_origins_childResource"
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
}
]
}
@@ -132,7 +132,7 @@
],
"description": "Microsoft.Cdn/profiles/endpoints"
},
- "Microsoft.Cdn_profiles_endpoints_customDomains": {
+ "profiles_endpoints_customDomains": {
"type": "object",
"properties": {
"type": {
@@ -165,7 +165,7 @@
],
"description": "Microsoft.Cdn/profiles/endpoints/customDomains"
},
- "Microsoft.Cdn_profiles_endpoints_origins": {
+ "profiles_endpoints_origins": {
"type": "object",
"properties": {
"type": {
@@ -364,7 +364,41 @@
"origins"
]
},
- "Microsoft.Cdn_profiles_endpoints_childResource": {
+ "OriginPropertiesParameters": {
+ "type": "object",
+ "properties": {
+ "hostName": {
+ "type": "string",
+ "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported."
+ },
+ "httpPort": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The value of the HTTP port. Must be between 1 and 65535."
+ },
+ "httpsPort": {
+ "oneOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ],
+ "description": "The value of the HTTPS port. Must be between 1 and 65535."
+ }
+ },
+ "required": [
+ "hostName"
+ ]
+ },
+ "profiles_endpoints_childResource": {
"type": "object",
"properties": {
"type": {
@@ -413,10 +447,10 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Cdn_profiles_endpoints_customDomains_childResource"
+ "$ref": "#/definitions/profiles_endpoints_customDomains_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Cdn_profiles_endpoints_origins_childResource"
+ "$ref": "#/definitions/profiles_endpoints_origins_childResource"
}
]
}
@@ -429,7 +463,7 @@
],
"description": "Microsoft.Cdn/profiles/endpoints"
},
- "Microsoft.Cdn_profiles_endpoints_customDomains_childResource": {
+ "profiles_endpoints_customDomains_childResource": {
"type": "object",
"properties": {
"type": {
@@ -462,7 +496,7 @@
],
"description": "Microsoft.Cdn/profiles/endpoints/customDomains"
},
- "Microsoft.Cdn_profiles_endpoints_origins_childResource": {
+ "profiles_endpoints_origins_childResource": {
"type": "object",
"properties": {
"type": {
@@ -495,40 +529,6 @@
],
"description": "Microsoft.Cdn/profiles/endpoints/origins"
},
- "OriginPropertiesParameters": {
- "type": "object",
- "properties": {
- "hostName": {
- "type": "string",
- "description": "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported."
- },
- "httpPort": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "The value of the HTTP port. Must be between 1 and 65535."
- },
- "httpsPort": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "The value of the HTTPS port. Must be between 1 and 65535."
- }
- },
- "required": [
- "hostName"
- ]
- },
"Sku": {
"type": "object",
"properties": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json
index d6cf3e64556cb..30685340f622d 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Compute/Microsoft.Compute.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Compute",
"description": "Microsoft Compute Resource Types",
"resourceDefinitions": {
- "Microsoft.Compute_availabilitySets": {
+ "availabilitySets": {
"type": "object",
"properties": {
"type": {
@@ -37,7 +37,7 @@
],
"description": "Microsoft.Compute/availabilitySets"
},
- "Microsoft.Compute_virtualMachines": {
+ "virtualMachines": {
"type": "object",
"properties": {
"type": {
@@ -79,7 +79,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Compute_virtualMachines_extensions_childResource"
+ "$ref": "#/definitions/virtualMachines_extensions_childResource"
}
]
}
@@ -91,7 +91,7 @@
],
"description": "Microsoft.Compute/virtualMachines"
},
- "Microsoft.Compute_virtualMachines_extensions": {
+ "virtualMachines_extensions": {
"type": "object",
"properties": {
"type": {
@@ -124,7 +124,7 @@
],
"description": "Microsoft.Compute/virtualMachines/extensions"
},
- "Microsoft.Compute_virtualMachineScaleSets": {
+ "virtualMachineScaleSets": {
"type": "object",
"properties": {
"type": {
@@ -678,39 +678,6 @@
},
"description": "Describes Windows Configuration of the OS Profile."
},
- "Microsoft.Compute_virtualMachines_extensions_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "extensions"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/VirtualMachineExtensionProperties"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Compute/virtualMachines/extensions"
- },
"NetworkInterfaceReference": {
"type": "object",
"properties": {
@@ -1340,6 +1307,39 @@
},
"description": "Describes the properties of a Virtual Machine."
},
+ "virtualMachines_extensions_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "extensions"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/VirtualMachineExtensionProperties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Compute/virtualMachines/extensions"
+ },
"VirtualMachineScaleSetExtension": {
"type": "object",
"properties": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json
index 6c740b079a4fc..0641162efbacb 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Network/Microsoft.Network.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Network",
"description": "Microsoft Network Resource Types",
"resourceDefinitions": {
- "Microsoft.Network_applicationGateways": {
+ "applicationGateways": {
"type": "object",
"properties": {
"type": {
@@ -41,7 +41,7 @@
],
"description": "Microsoft.Network/applicationGateways"
},
- "Microsoft.Network_connections": {
+ "connections": {
"type": "object",
"properties": {
"type": {
@@ -78,7 +78,7 @@
],
"description": "Microsoft.Network/connections"
},
- "Microsoft.Network_expressRouteCircuits": {
+ "expressRouteCircuits": {
"type": "object",
"properties": {
"type": {
@@ -124,10 +124,10 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Network_expressRouteCircuits_peerings_childResource"
+ "$ref": "#/definitions/expressRouteCircuits_peerings_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Network_expressRouteCircuits_authorizations_childResource"
+ "$ref": "#/definitions/expressRouteCircuits_authorizations_childResource"
}
]
}
@@ -139,7 +139,7 @@
],
"description": "Microsoft.Network/expressRouteCircuits"
},
- "Microsoft.Network_expressRouteCircuits_authorizations": {
+ "expressRouteCircuits_authorizations": {
"type": "object",
"properties": {
"type": {
@@ -180,7 +180,7 @@
],
"description": "Microsoft.Network/expressRouteCircuits/authorizations"
},
- "Microsoft.Network_expressRouteCircuits_peerings": {
+ "expressRouteCircuits_peerings": {
"type": "object",
"properties": {
"type": {
@@ -221,7 +221,7 @@
],
"description": "Microsoft.Network/expressRouteCircuits/peerings"
},
- "Microsoft.Network_loadBalancers": {
+ "loadBalancers": {
"type": "object",
"properties": {
"type": {
@@ -258,7 +258,7 @@
],
"description": "Microsoft.Network/loadBalancers"
},
- "Microsoft.Network_localNetworkGateways": {
+ "localNetworkGateways": {
"type": "object",
"properties": {
"type": {
@@ -295,7 +295,7 @@
],
"description": "Microsoft.Network/localNetworkGateways"
},
- "Microsoft.Network_networkInterfaces": {
+ "networkInterfaces": {
"type": "object",
"properties": {
"type": {
@@ -332,7 +332,7 @@
],
"description": "Microsoft.Network/networkInterfaces"
},
- "Microsoft.Network_networkSecurityGroups": {
+ "networkSecurityGroups": {
"type": "object",
"properties": {
"type": {
@@ -367,7 +367,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Network_networkSecurityGroups_securityRules_childResource"
+ "$ref": "#/definitions/networkSecurityGroups_securityRules_childResource"
}
]
}
@@ -379,7 +379,7 @@
],
"description": "Microsoft.Network/networkSecurityGroups"
},
- "Microsoft.Network_networkSecurityGroups_securityRules": {
+ "networkSecurityGroups_securityRules": {
"type": "object",
"properties": {
"type": {
@@ -420,7 +420,7 @@
],
"description": "Microsoft.Network/networkSecurityGroups/securityRules"
},
- "Microsoft.Network_publicIPAddresses": {
+ "publicIPAddresses": {
"type": "object",
"properties": {
"type": {
@@ -457,7 +457,7 @@
],
"description": "Microsoft.Network/publicIPAddresses"
},
- "Microsoft.Network_routeTables": {
+ "routeTables": {
"type": "object",
"properties": {
"type": {
@@ -492,7 +492,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Network_routeTables_routes_childResource"
+ "$ref": "#/definitions/routeTables_routes_childResource"
}
]
}
@@ -504,7 +504,7 @@
],
"description": "Microsoft.Network/routeTables"
},
- "Microsoft.Network_routeTables_routes": {
+ "routeTables_routes": {
"type": "object",
"properties": {
"type": {
@@ -545,7 +545,7 @@
],
"description": "Microsoft.Network/routeTables/routes"
},
- "Microsoft.Network_virtualnetworkgateways": {
+ "virtualnetworkgateways": {
"type": "object",
"properties": {
"type": {
@@ -582,7 +582,7 @@
],
"description": "Microsoft.Network/virtualnetworkgateways"
},
- "Microsoft.Network_virtualnetworks": {
+ "virtualnetworks": {
"type": "object",
"properties": {
"type": {
@@ -617,7 +617,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Network_virtualnetworks_subnets_childResource"
+ "$ref": "#/definitions/virtualnetworks_subnets_childResource"
}
]
}
@@ -629,7 +629,7 @@
],
"description": "Microsoft.Network/virtualnetworks"
},
- "Microsoft.Network_virtualnetworks_subnets": {
+ "virtualnetworks_subnets": {
"type": "object",
"properties": {
"type": {
@@ -2220,6 +2220,88 @@
},
"description": "Properties of ExpressRouteCircuit"
},
+ "expressRouteCircuits_authorizations_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "authorizations"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/AuthorizationPropertiesFormat"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
+ },
+ "etag": {
+ "type": "string",
+ "description": "A unique read-only string that changes whenever the resource is updated"
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/expressRouteCircuits/authorizations"
+ },
+ "expressRouteCircuits_peerings_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "peerings"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
+ },
+ "etag": {
+ "type": "string",
+ "description": "A unique read-only string that changes whenever the resource is updated"
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/expressRouteCircuits/peerings"
+ },
"ExpressRouteCircuitServiceProviderProperties": {
"type": "object",
"properties": {
@@ -3115,211 +3197,6 @@
},
"description": "LocalNetworkGateway properties"
},
- "Microsoft.Network_expressRouteCircuits_authorizations_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "authorizations"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/AuthorizationPropertiesFormat"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "name": {
- "type": "string",
- "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
- },
- "etag": {
- "type": "string",
- "description": "A unique read-only string that changes whenever the resource is updated"
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Network/expressRouteCircuits/authorizations"
- },
- "Microsoft.Network_expressRouteCircuits_peerings_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "peerings"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/ExpressRouteCircuitPeeringPropertiesFormat"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "name": {
- "type": "string",
- "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
- },
- "etag": {
- "type": "string",
- "description": "A unique read-only string that changes whenever the resource is updated"
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Network/expressRouteCircuits/peerings"
- },
- "Microsoft.Network_networkSecurityGroups_securityRules_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "securityRules"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/SecurityRulePropertiesFormat"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "name": {
- "type": "string",
- "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
- },
- "etag": {
- "type": "string",
- "description": "A unique read-only string that changes whenever the resource is updated"
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Network/networkSecurityGroups/securityRules"
- },
- "Microsoft.Network_routeTables_routes_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "routes"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/RoutePropertiesFormat"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "name": {
- "type": "string",
- "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
- },
- "etag": {
- "type": "string",
- "description": "A unique read-only string that changes whenever the resource is updated"
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Network/routeTables/routes"
- },
- "Microsoft.Network_virtualnetworks_subnets_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "subnets"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2016-03-30"
- ]
- },
- "properties": {
- "oneOf": [
- {
- "$ref": "#/definitions/SubnetPropertiesFormat"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "name": {
- "type": "string",
- "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
- },
- "etag": {
- "type": "string",
- "description": "A unique read-only string that changes whenever the resource is updated"
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Network/virtualnetworks/subnets"
- },
"NetworkInterface": {
"type": "object",
"properties": {
@@ -3739,6 +3616,47 @@
},
"description": "Network Security Group resource"
},
+ "networkSecurityGroups_securityRules_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "securityRules"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/SecurityRulePropertiesFormat"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
+ },
+ "etag": {
+ "type": "string",
+ "description": "A unique read-only string that changes whenever the resource is updated"
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/networkSecurityGroups/securityRules"
+ },
"OutboundNatRule": {
"type": "object",
"properties": {
@@ -4209,6 +4127,47 @@
},
"description": "Route Table resource"
},
+ "routeTables_routes_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "routes"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RoutePropertiesFormat"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
+ },
+ "etag": {
+ "type": "string",
+ "description": "A unique read-only string that changes whenever the resource is updated"
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/routeTables/routes"
+ },
"SecurityRule": {
"type": "object",
"properties": {
@@ -4889,6 +4848,47 @@
}
}
},
+ "virtualnetworks_subnets_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "subnets"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2016-03-30"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/SubnetPropertiesFormat"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "name": {
+ "type": "string",
+ "description": "Gets name of the resource that is unique within a resource group. This name can be used to access the resource"
+ },
+ "etag": {
+ "type": "string",
+ "description": "A unique read-only string that changes whenever the resource is updated"
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Network/virtualnetworks/subnets"
+ },
"VpnClientConfiguration": {
"type": "object",
"properties": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json
index a98dba664b645..79847f9feb66e 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Storage/Microsoft.Storage.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Storage",
"description": "Microsoft Storage Resource Types",
"resourceDefinitions": {
- "Microsoft.Storage_storageAccounts": {
+ "storageAccounts": {
"type": "object",
"properties": {
"type": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json
index 384d6bcb850f2..df0baf33435b7 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.CertificateRegistration.json
@@ -4,7 +4,7 @@
"title": "Microsoft.CertificateRegistration",
"description": "Microsoft CertificateRegistration Resource Types",
"resourceDefinitions": {
- "Microsoft.CertificateRegistration_certificateOrders": {
+ "certificateOrders": {
"type": "object",
"properties": {
"type": {
@@ -35,7 +35,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.CertificateRegistration_certificateOrders_certificates_childResource"
+ "$ref": "#/definitions/certificateOrders_certificates_childResource"
}
]
}
@@ -47,7 +47,7 @@
],
"description": "Microsoft.CertificateRegistration/certificateOrders"
},
- "Microsoft.CertificateRegistration_certificateOrders_certificates": {
+ "certificateOrders_certificates": {
"type": "object",
"properties": {
"type": {
@@ -437,7 +437,7 @@
}
}
},
- "Microsoft.CertificateRegistration_certificateOrders_certificates_childResource": {
+ "certificateOrders_certificates_childResource": {
"type": "object",
"properties": {
"type": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json
index afbd6b95f97f1..12caa3e346bd1 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.DomainRegistration.json
@@ -4,7 +4,7 @@
"title": "Microsoft.DomainRegistration",
"description": "Microsoft DomainRegistration Resource Types",
"resourceDefinitions": {
- "Microsoft.DomainRegistration_domains": {
+ "domains": {
"type": "object",
"properties": {
"type": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json
index 9ba73d1303b08..aca0f93c96142 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/Expected/Web/Microsoft.Web.json
@@ -4,7 +4,7 @@
"title": "Microsoft.Web",
"description": "Microsoft Web Resource Types",
"resourceDefinitions": {
- "Microsoft.Web_certificates": {
+ "certificates": {
"type": "object",
"properties": {
"type": {
@@ -37,7 +37,7 @@
],
"description": "Microsoft.Web/certificates"
},
- "Microsoft.Web_csrs": {
+ "csrs": {
"type": "object",
"properties": {
"type": {
@@ -70,7 +70,7 @@
],
"description": "Microsoft.Web/csrs"
},
- "Microsoft.Web_hostingEnvironments": {
+ "hostingEnvironments": {
"type": "object",
"properties": {
"type": {
@@ -101,7 +101,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_hostingEnvironments_workerPools_childResource"
+ "$ref": "#/definitions/hostingEnvironments_workerPools_childResource"
}
]
}
@@ -113,7 +113,7 @@
],
"description": "Microsoft.Web/hostingEnvironments"
},
- "Microsoft.Web_hostingEnvironments_workerPools": {
+ "hostingEnvironments_workerPools": {
"type": "object",
"properties": {
"type": {
@@ -156,7 +156,7 @@
],
"description": "Microsoft.Web/hostingEnvironments/workerPools"
},
- "Microsoft.Web_managedHostingEnvironments": {
+ "managedHostingEnvironments": {
"type": "object",
"properties": {
"type": {
@@ -189,7 +189,7 @@
],
"description": "Microsoft.Web/managedHostingEnvironments"
},
- "Microsoft.Web_serverfarms": {
+ "serverfarms": {
"type": "object",
"properties": {
"type": {
@@ -232,7 +232,7 @@
],
"description": "Microsoft.Web/serverfarms"
},
- "Microsoft.Web_serverfarms_virtualNetworkConnections_gateways": {
+ "serverfarms_virtualNetworkConnections_gateways": {
"type": "object",
"properties": {
"type": {
@@ -265,7 +265,7 @@
],
"description": "Microsoft.Web/serverfarms/virtualNetworkConnections/gateways"
},
- "Microsoft.Web_serverfarms_virtualNetworkConnections_routes": {
+ "serverfarms_virtualNetworkConnections_routes": {
"type": "object",
"properties": {
"type": {
@@ -298,7 +298,7 @@
],
"description": "Microsoft.Web/serverfarms/virtualNetworkConnections/routes"
},
- "Microsoft.Web_sites": {
+ "sites": {
"type": "object",
"properties": {
"type": {
@@ -329,19 +329,19 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_hybridconnection_childResource"
+ "$ref": "#/definitions/sites_hybridconnection_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_hostNameBindings_childResource"
+ "$ref": "#/definitions/sites_hostNameBindings_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_deployments_childResource"
+ "$ref": "#/definitions/sites_deployments_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_childResource"
+ "$ref": "#/definitions/sites_slots_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_virtualNetworkConnections_childResource"
+ "$ref": "#/definitions/sites_virtualNetworkConnections_childResource"
}
]
}
@@ -353,7 +353,7 @@
],
"description": "Microsoft.Web/sites"
},
- "Microsoft.Web_sites_deployments": {
+ "sites_deployments": {
"type": "object",
"properties": {
"type": {
@@ -386,7 +386,7 @@
],
"description": "Microsoft.Web/sites/deployments"
},
- "Microsoft.Web_sites_hostNameBindings": {
+ "sites_hostNameBindings": {
"type": "object",
"properties": {
"type": {
@@ -419,7 +419,7 @@
],
"description": "Microsoft.Web/sites/hostNameBindings"
},
- "Microsoft.Web_sites_hybridconnection": {
+ "sites_hybridconnection": {
"type": "object",
"properties": {
"type": {
@@ -452,7 +452,7 @@
],
"description": "Microsoft.Web/sites/hybridconnection"
},
- "Microsoft.Web_sites_instances_deployments": {
+ "sites_instances_deployments": {
"type": "object",
"properties": {
"type": {
@@ -485,7 +485,7 @@
],
"description": "Microsoft.Web/sites/instances/deployments"
},
- "Microsoft.Web_sites_slots": {
+ "sites_slots": {
"type": "object",
"properties": {
"type": {
@@ -516,16 +516,16 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_hybridconnection_childResource"
+ "$ref": "#/definitions/sites_slots_hybridconnection_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_hostNameBindings_childResource"
+ "$ref": "#/definitions/sites_slots_hostNameBindings_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_deployments_childResource"
+ "$ref": "#/definitions/sites_slots_deployments_childResource"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_virtualNetworkConnections_childResource"
+ "$ref": "#/definitions/sites_slots_virtualNetworkConnections_childResource"
}
]
}
@@ -537,7 +537,7 @@
],
"description": "Microsoft.Web/sites/slots"
},
- "Microsoft.Web_sites_slots_deployments": {
+ "sites_slots_deployments": {
"type": "object",
"properties": {
"type": {
@@ -570,7 +570,7 @@
],
"description": "Microsoft.Web/sites/slots/deployments"
},
- "Microsoft.Web_sites_slots_hostNameBindings": {
+ "sites_slots_hostNameBindings": {
"type": "object",
"properties": {
"type": {
@@ -603,7 +603,7 @@
],
"description": "Microsoft.Web/sites/slots/hostNameBindings"
},
- "Microsoft.Web_sites_slots_hybridconnection": {
+ "sites_slots_hybridconnection": {
"type": "object",
"properties": {
"type": {
@@ -636,7 +636,7 @@
],
"description": "Microsoft.Web/sites/slots/hybridconnection"
},
- "Microsoft.Web_sites_slots_instances_deployments": {
+ "sites_slots_instances_deployments": {
"type": "object",
"properties": {
"type": {
@@ -669,7 +669,7 @@
],
"description": "Microsoft.Web/sites/slots/instances/deployments"
},
- "Microsoft.Web_sites_slots_virtualNetworkConnections": {
+ "sites_slots_virtualNetworkConnections": {
"type": "object",
"properties": {
"type": {
@@ -700,7 +700,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_virtualNetworkConnections_gateways_childResource"
+ "$ref": "#/definitions/sites_slots_virtualNetworkConnections_gateways_childResource"
}
]
}
@@ -712,7 +712,7 @@
],
"description": "Microsoft.Web/sites/slots/virtualNetworkConnections"
},
- "Microsoft.Web_sites_slots_virtualNetworkConnections_gateways": {
+ "sites_slots_virtualNetworkConnections_gateways": {
"type": "object",
"properties": {
"type": {
@@ -745,7 +745,7 @@
],
"description": "Microsoft.Web/sites/slots/virtualNetworkConnections/gateways"
},
- "Microsoft.Web_sites_virtualNetworkConnections": {
+ "sites_virtualNetworkConnections": {
"type": "object",
"properties": {
"type": {
@@ -776,7 +776,7 @@
"items": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_virtualNetworkConnections_gateways_childResource"
+ "$ref": "#/definitions/sites_virtualNetworkConnections_gateways_childResource"
}
]
}
@@ -788,7 +788,7 @@
],
"description": "Microsoft.Web/sites/virtualNetworkConnections"
},
- "Microsoft.Web_sites_virtualNetworkConnections_gateways": {
+ "sites_virtualNetworkConnections_gateways": {
"type": "object",
"properties": {
"type": {
@@ -1607,6 +1607,49 @@
},
"description": "Specification for a hostingEnvironment (App Service Environment) to use for this resource"
},
+ "hostingEnvironments_workerPools_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "workerPools"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/WorkerPool_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ },
+ "sku": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/SkuDescription"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/hostingEnvironments/workerPools"
+ },
"HostNameBinding_properties": {
"type": "object",
"properties": {
@@ -1735,744 +1778,302 @@
},
"description": "Represents an ip security restriction on a web app."
},
- "Microsoft.Web_hostingEnvironments_workerPools_childResource": {
+ "NameValuePair": {
"type": "object",
"properties": {
- "type": {
+ "name": {
"type": "string",
- "enum": [
- "workerPools"
- ]
+ "description": "Pair name"
},
- "apiVersion": {
+ "value": {
"type": "string",
- "enum": [
- "2015-08-01"
- ]
- },
- "properties": {
+ "description": "Pair value"
+ }
+ },
+ "description": "Name value pair"
+ },
+ "NetworkAccessControlEntry": {
+ "type": "object",
+ "properties": {
+ "action": {
"oneOf": [
{
- "$ref": "#/definitions/WorkerPool_properties"
+ "type": "string",
+ "enum": [
+ "Permit",
+ "Deny"
+ ]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "Possible values include: 'Permit', 'Deny'"
},
- "sku": {
+ "description": {
+ "type": "string"
+ },
+ "order": {
"oneOf": [
{
- "$ref": "#/definitions/SkuDescription"
+ "type": "integer"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
+ },
+ "remoteSubnet": {
+ "type": "string"
}
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/hostingEnvironments/workerPools"
+ }
},
- "Microsoft.Web_sites_deployments_childResource": {
+ "RampUpRule": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "enum": [
- "deployments"
- ]
- },
- "apiVersion": {
+ "actionHostName": {
"type": "string",
- "enum": [
- "2015-08-01"
- ]
+ "description": "Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net"
},
- "properties": {
+ "reroutePercentage": {
"oneOf": [
{
- "$ref": "#/definitions/Deployment_properties"
+ "type": "number"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/deployments"
- },
- "Microsoft.Web_sites_hostNameBindings_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "hostNameBindings"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ ],
+ "description": "Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName}"
},
- "properties": {
+ "changeStep": {
"oneOf": [
{
- "$ref": "#/definitions/HostNameBinding_properties"
+ "type": "number"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/hostNameBindings"
- },
- "Microsoft.Web_sites_hybridconnection_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "hybridconnection"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ ],
+ "description": "[Optional] In auto ramp up scenario this is the step to to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches \r\n {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specificed in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}.\r\n Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl}"
},
- "properties": {
+ "changeIntervalInMinutes": {
"oneOf": [
{
- "$ref": "#/definitions/RelayServiceConnectionEntity_properties"
+ "type": "integer"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/hybridconnection"
- },
- "Microsoft.Web_sites_slots_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "slots"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ ],
+ "description": "[Optional] Specifies interval in mimuntes to reevaluate ReroutePercentage"
},
- "properties": {
+ "minReroutePercentage": {
"oneOf": [
{
- "$ref": "#/definitions/Site_properties"
+ "type": "number"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "resources": {
- "type": "array",
- "items": {
+ ],
+ "description": "[Optional] Specifies lower boundary above which ReroutePercentage will stay."
+ },
+ "maxReroutePercentage": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_hybridconnection_childResource"
- },
- {
- "$ref": "#/definitions/Microsoft.Web_sites_slots_hostNameBindings_childResource"
+ "type": "number"
},
{
- "$ref": "#/definitions/Microsoft.Web_sites_slots_deployments_childResource"
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "[Optional] Specifies upper boundary below which ReroutePercentage will stay."
+ },
+ "changeDecisionCallbackUrl": {
+ "type": "string",
+ "description": "Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified. See TiPCallback site extension for the scaffold and contracts.\r\n https://www.siteextensions.net/packages/TiPCallback/"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment."
}
},
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots"
+ "description": "Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance"
},
- "Microsoft.Web_sites_slots_deployments_childResource": {
+ "RelayServiceConnectionEntity_properties": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "enum": [
- "deployments"
- ]
+ "entityName": {
+ "type": "string"
},
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ "entityConnectionString": {
+ "type": "string"
},
- "properties": {
+ "resourceType": {
+ "type": "string"
+ },
+ "resourceConnectionString": {
+ "type": "string"
+ },
+ "hostname": {
+ "type": "string"
+ },
+ "port": {
"oneOf": [
{
- "$ref": "#/definitions/Deployment_properties"
+ "type": "integer"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
+ },
+ "biztalkUri": {
+ "type": "string"
}
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots/deployments"
+ }
},
- "Microsoft.Web_sites_slots_hostNameBindings_childResource": {
+ "RequestsBasedTrigger": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "enum": [
- "hostNameBindings"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
- },
- "properties": {
+ "count": {
"oneOf": [
{
- "$ref": "#/definitions/HostNameBinding_properties"
+ "type": "integer"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "Count"
+ },
+ "timeInterval": {
+ "type": "string",
+ "description": "TimeInterval"
}
},
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots/hostNameBindings"
+ "description": "RequestsBasedTrigger"
},
- "Microsoft.Web_sites_slots_hybridconnection_childResource": {
+ "ServerFarmWithRichSku_properties": {
"type": "object",
"properties": {
- "type": {
+ "name": {
"type": "string",
- "enum": [
- "hybridconnection"
- ]
+ "description": "Name for the App Service Plan"
},
- "apiVersion": {
+ "workerTierName": {
"type": "string",
- "enum": [
- "2015-08-01"
- ]
+ "description": "Target worker tier assigned to the App Service Plan"
},
- "properties": {
+ "adminSiteName": {
+ "type": "string",
+ "description": "App Service Plan administration site"
+ },
+ "hostingEnvironmentProfile": {
"oneOf": [
{
- "$ref": "#/definitions/RelayServiceConnectionEntity_properties"
+ "$ref": "#/definitions/HostingEnvironmentProfile"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots/hybridconnection"
- },
- "Microsoft.Web_sites_slots_virtualNetworkConnections_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "virtualNetworkConnections"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ ],
+ "description": "Specification for the hosting environment (App Service Environment) to use for the App Service Plan"
},
- "properties": {
+ "maximumNumberOfWorkers": {
"oneOf": [
{
- "$ref": "#/definitions/VnetInfo_properties"
+ "type": "integer"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "resources": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "$ref": "#/definitions/Microsoft.Web_sites_slots_virtualNetworkConnections_gateways_childResource"
- }
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots/virtualNetworkConnections"
- },
- "Microsoft.Web_sites_slots_virtualNetworkConnections_gateways_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "gateways"
- ]
- },
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ ],
+ "description": "Maximum number of instances that can be assigned to this App Service Plan"
},
- "properties": {
+ "perSiteScaling": {
"oneOf": [
{
- "$ref": "#/definitions/VnetGateway_properties"
+ "type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "If True apps assigned to this App Service Plan can be scaled independently\r\n If False apps assigned to this App Service Plan will scale to all instances of the plan"
}
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/slots/virtualNetworkConnections/gateways"
+ }
},
- "Microsoft.Web_sites_virtualNetworkConnections_childResource": {
+ "Site_properties": {
"type": "object",
"properties": {
- "type": {
- "type": "string",
- "enum": [
- "virtualNetworkConnections"
- ]
- },
- "apiVersion": {
+ "name": {
"type": "string",
- "enum": [
- "2015-08-01"
- ]
+ "description": "Name of web app"
},
- "properties": {
+ "enabled": {
"oneOf": [
{
- "$ref": "#/definitions/VnetInfo_properties"
+ "type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "resources": {
- "type": "array",
- "items": {
+ ],
+ "description": "True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line)."
+ },
+ "hostNameSslStates": {
"oneOf": [
{
- "$ref": "#/definitions/Microsoft.Web_sites_virtualNetworkConnections_gateways_childResource"
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/HostNameSslState"
+ }
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/virtualNetworkConnections"
- },
- "Microsoft.Web_sites_virtualNetworkConnections_gateways_childResource": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": [
- "gateways"
- ]
+ ],
+ "description": "Hostname SSL states are used to manage the SSL bindings for site's hostnames."
},
- "apiVersion": {
- "type": "string",
- "enum": [
- "2015-08-01"
- ]
+ "serverFarmId": {
+ "type": "string"
},
- "properties": {
+ "siteConfig": {
"oneOf": [
{
- "$ref": "#/definitions/VnetGateway_properties"
+ "$ref": "#/definitions/SiteConfig"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
- }
- },
- "required": [
- "type",
- "apiVersion",
- "properties"
- ],
- "description": "Microsoft.Web/sites/virtualNetworkConnections/gateways"
- },
- "NameValuePair": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Pair name"
+ ],
+ "description": "Configuration of web app"
},
- "value": {
- "type": "string",
- "description": "Pair value"
- }
- },
- "description": "Name value pair"
- },
- "NetworkAccessControlEntry": {
- "type": "object",
- "properties": {
- "action": {
+ "scmSiteAlsoStopped": {
"oneOf": [
{
- "type": "string",
- "enum": [
- "Permit",
- "Deny"
- ]
+ "type": "boolean"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
- "description": "Possible values include: 'Permit', 'Deny'"
- },
- "description": {
- "type": "string"
+ "description": "If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false."
},
- "order": {
+ "hostingEnvironmentProfile": {
"oneOf": [
{
- "type": "integer"
+ "$ref": "#/definitions/HostingEnvironmentProfile"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
- ]
+ ],
+ "description": "Specification for the hosting environment (App Service Environment) to use for the web app"
},
- "remoteSubnet": {
- "type": "string"
- }
- }
- },
- "RampUpRule": {
- "type": "object",
- "properties": {
- "actionHostName": {
- "type": "string",
- "description": "Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net"
- },
- "reroutePercentage": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName}"
- },
- "changeStep": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "[Optional] In auto ramp up scenario this is the step to to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches \r\n {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specificed in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}.\r\n Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl}"
- },
- "changeIntervalInMinutes": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "[Optional] Specifies interval in mimuntes to reevaluate ReroutePercentage"
- },
- "minReroutePercentage": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "[Optional] Specifies lower boundary above which ReroutePercentage will stay."
- },
- "maxReroutePercentage": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "[Optional] Specifies upper boundary below which ReroutePercentage will stay."
- },
- "changeDecisionCallbackUrl": {
- "type": "string",
- "description": "Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified. See TiPCallback site extension for the scaffold and contracts.\r\n https://www.siteextensions.net/packages/TiPCallback/"
- },
- "name": {
- "type": "string",
- "description": "Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment."
- }
- },
- "description": "Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change routing % based on performance"
- },
- "RelayServiceConnectionEntity_properties": {
- "type": "object",
- "properties": {
- "entityName": {
- "type": "string"
- },
- "entityConnectionString": {
- "type": "string"
- },
- "resourceType": {
- "type": "string"
- },
- "resourceConnectionString": {
- "type": "string"
- },
- "hostname": {
- "type": "string"
- },
- "port": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ]
- },
- "biztalkUri": {
- "type": "string"
- }
- }
- },
- "RequestsBasedTrigger": {
- "type": "object",
- "properties": {
- "count": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Count"
- },
- "timeInterval": {
- "type": "string",
- "description": "TimeInterval"
- }
- },
- "description": "RequestsBasedTrigger"
- },
- "ServerFarmWithRichSku_properties": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name for the App Service Plan"
- },
- "workerTierName": {
- "type": "string",
- "description": "Target worker tier assigned to the App Service Plan"
- },
- "adminSiteName": {
- "type": "string",
- "description": "App Service Plan administration site"
- },
- "hostingEnvironmentProfile": {
- "oneOf": [
- {
- "$ref": "#/definitions/HostingEnvironmentProfile"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Specification for the hosting environment (App Service Environment) to use for the App Service Plan"
- },
- "maximumNumberOfWorkers": {
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Maximum number of instances that can be assigned to this App Service Plan"
- },
- "perSiteScaling": {
- "oneOf": [
- {
- "type": "boolean"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "If True apps assigned to this App Service Plan can be scaled independently\r\n If False apps assigned to this App Service Plan will scale to all instances of the plan"
- }
- }
- },
- "Site_properties": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of web app"
- },
- "enabled": {
- "oneOf": [
- {
- "type": "boolean"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line)."
- },
- "hostNameSslStates": {
- "oneOf": [
- {
- "type": "array",
- "items": {
- "$ref": "#/definitions/HostNameSslState"
- }
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Hostname SSL states are used to manage the SSL bindings for site's hostnames."
- },
- "serverFarmId": {
- "type": "string"
- },
- "siteConfig": {
- "oneOf": [
- {
- "$ref": "#/definitions/SiteConfig"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Configuration of web app"
- },
- "scmSiteAlsoStopped": {
- "oneOf": [
- {
- "type": "boolean"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false."
- },
- "hostingEnvironmentProfile": {
- "oneOf": [
- {
- "$ref": "#/definitions/HostingEnvironmentProfile"
- },
- {
- "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
- }
- ],
- "description": "Specification for the hosting environment (App Service Environment) to use for the web app"
- },
- "microService": {
+ "microService": {
"type": "string"
},
"gatewaySiteName": {
@@ -3011,6 +2612,405 @@
},
"description": "Represents metric limits set on a web app."
},
+ "sites_deployments_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "deployments"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Deployment_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/deployments"
+ },
+ "sites_hostNameBindings_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "hostNameBindings"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HostNameBinding_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/hostNameBindings"
+ },
+ "sites_hybridconnection_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "hybridconnection"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RelayServiceConnectionEntity_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/hybridconnection"
+ },
+ "sites_slots_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "slots"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Site_properties"
+ },
+ {
+ "$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"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots"
+ },
+ "sites_slots_deployments_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "deployments"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/Deployment_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots/deployments"
+ },
+ "sites_slots_hostNameBindings_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "hostNameBindings"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/HostNameBinding_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots/hostNameBindings"
+ },
+ "sites_slots_hybridconnection_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "hybridconnection"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/RelayServiceConnectionEntity_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots/hybridconnection"
+ },
+ "sites_slots_virtualNetworkConnections_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "virtualNetworkConnections"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/VnetInfo_properties"
+ },
+ {
+ "$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"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots/virtualNetworkConnections"
+ },
+ "sites_slots_virtualNetworkConnections_gateways_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "gateways"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/VnetGateway_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/slots/virtualNetworkConnections/gateways"
+ },
+ "sites_virtualNetworkConnections_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "virtualNetworkConnections"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/VnetInfo_properties"
+ },
+ {
+ "$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"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/virtualNetworkConnections"
+ },
+ "sites_virtualNetworkConnections_gateways_childResource": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "enum": [
+ "gateways"
+ ]
+ },
+ "apiVersion": {
+ "type": "string",
+ "enum": [
+ "2015-08-01"
+ ]
+ },
+ "properties": {
+ "oneOf": [
+ {
+ "$ref": "#/definitions/VnetGateway_properties"
+ },
+ {
+ "$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
+ }
+ ]
+ }
+ },
+ "required": [
+ "type",
+ "apiVersion",
+ "properties"
+ ],
+ "description": "Microsoft.Web/sites/virtualNetworkConnections/gateways"
+ },
"SkuDescription": {
"type": "object",
"properties": {
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
index 4d85c4f3276e5..4c90684e6a852 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema.Tests/ResourceSchemaParserTests.cs
@@ -57,7 +57,7 @@ public void ParseWithServiceClientWithCreateResourceMethod()
Assert.Equal("Mock.Provider", schema.Title);
Assert.Equal("Mock Provider Resource Types", schema.Description);
Assert.Equal(1, schema.ResourceDefinitions.Count);
- Assert.Equal("Mock.Provider_mockResourceNames", schema.ResourceDefinitions.Keys.Single());
+ Assert.Equal("mockResourceNames", schema.ResourceDefinitions.Keys.Single());
Assert.Equal(
new JsonSchema()
{
@@ -70,7 +70,7 @@ public void ParseWithServiceClientWithCreateResourceMethod()
}
.AddEnum("Mock.Provider/mockResourceNames"),
true),
- schema.ResourceDefinitions["Mock.Provider_mockResourceNames"]);
+ schema.ResourceDefinitions["mockResourceNames"]);
Assert.NotNull(schema.Definitions);
Assert.Equal(0, schema.Definitions.Count);
}
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/Properties/AssemblyInfo.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/Properties/AssemblyInfo.cs
index da321c159d8f4..37bc04b37366f 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/Properties/AssemblyInfo.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/Properties/AssemblyInfo.cs
@@ -1,6 +1,5 @@
using System;
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -35,4 +34,3 @@
// [assembly: AssemblyVersion("1.0.*")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: InternalsVisibleTo("AutoRest.Generator.AzureResourceSchema.Tests")]
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaParser.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaParser.cs
index 28abf47ca8657..6703a0eb73ba4 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaParser.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaParser.cs
@@ -122,7 +122,7 @@ public static class ResourceSchemaParser
}
}
- string resourcePropertyName = resourceType.Replace('/', '_');
+ string resourcePropertyName = resourceType.Substring(resourceProvider.Length + 1).Replace('/', '_');
Debug.Assert(!resourceSchema.ResourceDefinitions.ContainsKey(resourcePropertyName));
resourceSchema.AddResourceDefinition(resourcePropertyName, resourceDefinition);
}
@@ -153,7 +153,7 @@ public static class ResourceSchemaParser
JsonSchema childResourceDefinition = resourceDefinition.Clone();
childResourceDefinition.ResourceType = childResourceType;
- string childResourceDefinitionPropertyName = resourcePropertyName + "_childResource";
+ string childResourceDefinitionPropertyName = string.Join("_", resourcePropertyName, "childResource");
resourceSchema.AddDefinition(childResourceDefinitionPropertyName, childResourceDefinition);
parentResourceDefinition.AddResource(new JsonSchema()
@@ -364,7 +364,7 @@ private static JsonSchema ParsePrimaryType(PrimaryType primaryType)
///
///
///
- internal static bool IsCreateResourceMethod(Method method)
+ public static bool IsCreateResourceMethod(Method method)
{
if (method == null)
{
@@ -398,7 +398,7 @@ internal static bool IsCreateResourceMethod(Method method)
///
///
///
- internal static string GetResourceType(string resourceProvider, string methodUrlPathAfterProvider)
+ public static string GetResourceType(string resourceProvider, string methodUrlPathAfterProvider)
{
if (string.IsNullOrWhiteSpace(resourceProvider))
{
diff --git a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
index 0a36309d0ac4f..5da44b80c7403 100644
--- a/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
+++ b/AutoRest/Generators/AzureResourceSchema/AzureResourceSchema/ResourceSchemaWriter.cs
@@ -33,7 +33,7 @@ public static void Write(TextWriter writer, ResourceSchema resourceSchema)
}
}
- internal static void Write(JsonTextWriter writer, ResourceSchema resourceSchema)
+ public static void Write(JsonTextWriter writer, ResourceSchema resourceSchema)
{
if (writer == null)
{
@@ -120,7 +120,7 @@ private static void WriteDefinitionMap(JsonTextWriter writer, string definitionM
}
}
- internal static void WriteDefinition(JsonTextWriter writer, string resourceName, JsonSchema definition)
+ public static void WriteDefinition(JsonTextWriter writer, string resourceName, JsonSchema definition)
{
if (definition != null)
{
@@ -191,7 +191,7 @@ private static void WriteDefinitionArray(JsonTextWriter writer, string arrayName
}
}
- internal static void WriteProperty(JsonTextWriter writer, string propertyName, string propertyValue)
+ public static void WriteProperty(JsonTextWriter writer, string propertyName, string propertyValue)
{
if (writer == null)
{