From ee73511c253af1d059ba08598029a647e96041f1 Mon Sep 17 00:00:00 2001 From: nachakra <40373275+nachakra@users.noreply.github.com> Date: Thu, 16 Jul 2020 18:55:31 -0700 Subject: [PATCH] Make origin a ProxyResource instead of TrackedResource (#10126) * Make origin a ProxyResource instead of TrackedResource * Fix model validation error * Fix model validation errors * Fix prettier errors * Make origin a proxyresource for all API versions starting from 12-30-2019 --- .../Microsoft.Cdn/stable/2019-12-31/cdn.json | 9 +-------- .../2019-12-31/examples/Origins_Create.json | 4 ---- .../stable/2019-12-31/examples/Origins_Get.json | 4 ---- .../examples/Origins_ListByEndpoint.json | 4 ---- .../2019-12-31/examples/Origins_Update.json | 11 ----------- .../Microsoft.Cdn/stable/2020-03-31/cdn.json | 9 +-------- .../2020-03-31/examples/Origins_Create.json | 16 ---------------- .../stable/2020-03-31/examples/Origins_Get.json | 4 ---- .../examples/Origins_ListByEndpoint.json | 4 ---- .../2020-03-31/examples/Origins_Update.json | 11 ----------- .../Microsoft.Cdn/stable/2020-04-15/cdn.json | 9 +-------- .../2020-04-15/examples/Origins_Create.json | 16 ---------------- .../stable/2020-04-15/examples/Origins_Get.json | 4 ---- .../examples/Origins_ListByEndpoint.json | 4 ---- .../2020-04-15/examples/Origins_Update.json | 11 ----------- 15 files changed, 3 insertions(+), 117 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/cdn.json index a67766220370..4282327a5c0a 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/cdn.json @@ -4332,7 +4332,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/TrackedResource" + "$ref": "#/definitions/ProxyResource" } ], "properties": { @@ -4378,13 +4378,6 @@ "type": "object", "description": "Origin properties needed for origin update.", "properties": { - "tags": { - "description": "Origin tags.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/OriginUpdatePropertiesParameters" diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Create.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Create.json index c22f89554a0e..f63c539d6134 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Create.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Create.json @@ -7,7 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "origin": { - "location": "WestUs", "properties": { "hostName": "www.someDomain.net", "httpPort": 80, @@ -25,7 +24,6 @@ "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", - "location": "WestUs", "properties": { "provisioningState": "Succeeded", "resourceState": "Active", @@ -44,7 +42,6 @@ "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", - "location": "WestUs", "properties": { "provisioningState": "Succeeded", "resourceState": "Active", @@ -63,7 +60,6 @@ "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", - "location": "WestUs", "properties": { "provisioningState": "Succeeded", "resourceState": "Active", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Get.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Get.json index be96f1425202..802d78ffa944 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Get.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Get.json @@ -11,10 +11,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_ListByEndpoint.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_ListByEndpoint.json index 4c2643e643a8..7f1338ae8103 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_ListByEndpoint.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_ListByEndpoint.json @@ -12,10 +12,6 @@ "value": [ { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Update.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Update.json index ba0d895812e3..7bb20b98fe55 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Update.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2019-12-31/examples/Origins_Update.json @@ -7,9 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "originUpdateProperties": { - "tags": { - "key1": "value1" - }, "properties": { "httpPort": 42, "httpsPort": 43, @@ -24,10 +21,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -47,10 +40,6 @@ "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { "provisioningState": "Succeeded", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/cdn.json index 3fe6e8897763..447afda283be 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/cdn.json @@ -4428,7 +4428,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/TrackedResource" + "$ref": "#/definitions/ProxyResource" } ], "properties": { @@ -4474,13 +4474,6 @@ "type": "object", "description": "Origin properties needed for origin update.", "properties": { - "tags": { - "description": "Origin tags.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/OriginUpdatePropertiesParameters" diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Create.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Create.json index ba59911b81e7..cd6b24a65618 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Create.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Create.json @@ -7,10 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "origin": { - "location": "WestUs", - "tags": { - "key1": "value1" - }, "properties": { "hostName": "www.someDomain.net", "httpPort": 80, @@ -26,10 +22,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -48,10 +40,6 @@ "201": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -70,10 +58,6 @@ "202": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Get.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Get.json index 56444627eff0..06fbd8976f03 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Get.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Get.json @@ -11,10 +11,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_ListByEndpoint.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_ListByEndpoint.json index 1e81714e36a8..5f2be5eb4302 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_ListByEndpoint.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_ListByEndpoint.json @@ -12,10 +12,6 @@ "value": [ { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Update.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Update.json index c47e493a4b2a..7f58c08f8f21 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Update.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-03-31/examples/Origins_Update.json @@ -7,9 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "originUpdateProperties": { - "tags": { - "key1": "value1" - }, "properties": { "httpPort": 42, "httpsPort": 43, @@ -24,10 +21,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -47,10 +40,6 @@ "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { "provisioningState": "Succeeded", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/cdn.json index fe78dbacaf73..30e6c89613de 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/cdn.json @@ -4452,7 +4452,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/TrackedResource" + "$ref": "#/definitions/ProxyResource" } ], "properties": { @@ -4514,13 +4514,6 @@ "type": "object", "description": "Origin properties needed for origin update.", "properties": { - "tags": { - "description": "Origin tags.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/OriginUpdatePropertiesParameters" diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Create.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Create.json index 31ad52dc4aaa..d8e9fa660f46 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Create.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Create.json @@ -7,10 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "origin": { - "location": "WestUs", - "tags": { - "key1": "value1" - }, "properties": { "hostName": "www.someDomain.net", "httpPort": 80, @@ -29,10 +25,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -55,10 +47,6 @@ "201": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -81,10 +69,6 @@ "202": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Get.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Get.json index 89a514a4d173..3c4cdccbf1c1 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Get.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Get.json @@ -11,10 +11,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_ListByEndpoint.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_ListByEndpoint.json index 13aae31ac89f..6b2550edbb95 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_ListByEndpoint.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_ListByEndpoint.json @@ -12,10 +12,6 @@ "value": [ { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Update.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Update.json index f6e79f729785..710f627dce30 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Update.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2020-04-15/examples/Origins_Update.json @@ -7,9 +7,6 @@ "endpointName": "endpoint1", "originName": "www-someDomain-net", "originUpdateProperties": { - "tags": { - "key1": "value1" - }, "properties": { "httpPort": 42, "httpsPort": 43, @@ -25,10 +22,6 @@ "200": { "body": { "name": "www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { @@ -51,10 +44,6 @@ "body": { "name": "www-someDomain-net", "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/origins/www-someDomain-net", - "location": "WestUs", - "tags": { - "key1": "value1" - }, "type": "Microsoft.Cdn/profiles/endpoints/origins", "properties": { "provisioningState": "Succeeded",