From d08245b34637f9970c0ae1bffc4f91704d77eb6d Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Thu, 21 Feb 2019 12:15:54 +0800 Subject: [PATCH 1/6] AddSuppress --- specification/machinelearning/resource-manager/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/machinelearning/resource-manager/readme.md b/specification/machinelearning/resource-manager/readme.md index 4db6a6f71130..8e18ca8b109f 100644 --- a/specification/machinelearning/resource-manager/readme.md +++ b/specification/machinelearning/resource-manager/readme.md @@ -49,6 +49,14 @@ input-file: - Microsoft.MachineLearning/stable/2017-01-01/webservices.json ``` +## Suppression +``` yaml +directive: + - suppress: PatchBodyParametersSchema + from: webservices.json + reason: The webservice's location and properties must be required when creating a web service. They can’t be changed without breaking Patch API. +``` + ### Tag: package-commitmentPlans-2016-05-preview These settings apply only when `--tag=package-commitmentPlans-2016-05-preview` is specified on the command line. From f3a73e74ff6f9ce3b454c4454795d4297f09f210 Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Fri, 15 Mar 2019 16:45:23 +0800 Subject: [PATCH 2/6] AddNewDefinitionForPatchWebService --- .../stable/2017-01-01/webservices.json | 52 ++++++++++++++++++- .../resource-manager/readme.md | 8 --- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json index 2c4df49dcdfd..076bc5ed01a1 100644 --- a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json +++ b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json @@ -152,7 +152,7 @@ "description": "The payload to use to patch the web service.", "required": true, "schema": { - "$ref": "#/definitions/WebService" + "$ref": "#/definitions/PatchedWebService" } }, { @@ -443,9 +443,42 @@ } } }, + "PatchedResource": { + "description": "Azure resource.", + "x-ms-azure-resource": true, + "properties": { + "id": { + "description": "Specifies the resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Specifies the name of the resource.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "Specifies the location of the resource.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Specifies the type of the resource.", + "type": "string", + "readOnly": true + }, + "tags": { + "description": "Contains resource tags defined as key/value pairs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "WebService": { "type": "object", - "description": "Instance of an Azure ML web service resource.", + "description": "Instance of an Patched Azure ML web service resource.", "allOf": [ { "$ref": "#/definitions/Resource" @@ -460,6 +493,21 @@ "required": [ "properties" ] + }, + "PatchedWebService": { + "type": "object", + "description": "Instance of an Patched Azure ML web service resource.", + "allOf": [ + { + "$ref": "#/definitions/PatchedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/WebServiceProperties", + "description": "Contains the property payload that describes the web service." + } + } }, "WebServiceProperties": { "type": "object", diff --git a/specification/machinelearning/resource-manager/readme.md b/specification/machinelearning/resource-manager/readme.md index 8e18ca8b109f..4db6a6f71130 100644 --- a/specification/machinelearning/resource-manager/readme.md +++ b/specification/machinelearning/resource-manager/readme.md @@ -49,14 +49,6 @@ input-file: - Microsoft.MachineLearning/stable/2017-01-01/webservices.json ``` -## Suppression -``` yaml -directive: - - suppress: PatchBodyParametersSchema - from: webservices.json - reason: The webservice's location and properties must be required when creating a web service. They can’t be changed without breaking Patch API. -``` - ### Tag: package-commitmentPlans-2016-05-preview These settings apply only when `--tag=package-commitmentPlans-2016-05-preview` is specified on the command line. From 3e4f75e7a15cbd81f6161bf9221a29a621386acc Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Fri, 15 Mar 2019 16:48:17 +0800 Subject: [PATCH 3/6] RevertWebServiceDefinition --- .../stable/2017-01-01/webservices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json index 076bc5ed01a1..be62a932aaa9 100644 --- a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json +++ b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json @@ -478,7 +478,7 @@ }, "WebService": { "type": "object", - "description": "Instance of an Patched Azure ML web service resource.", + "description": "Instance of an Azure ML web service resource.", "allOf": [ { "$ref": "#/definitions/Resource" From b8e8c7f24c26efba379ddf0782c815a984682c01 Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Fri, 15 Mar 2019 16:55:35 +0800 Subject: [PATCH 4/6] Formatting --- .../stable/2017-01-01/webservices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json index be62a932aaa9..3061906d2b5c 100644 --- a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json +++ b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json @@ -460,7 +460,7 @@ "location": { "description": "Specifies the location of the resource.", "type": "string", - "readOnly": true + "readOnly": true }, "type": { "description": "Specifies the type of the resource.", From 38c2a307871df4a04014fd8eeffb5bca588dc4ee Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Tue, 19 Mar 2019 13:48:20 +0800 Subject: [PATCH 5/6] fix validation 'Model validation check' failures --- .../stable/2017-01-01/webservices.json | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json index 3061906d2b5c..02162cc9fdca 100644 --- a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json +++ b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json @@ -485,10 +485,8 @@ } ], "properties": { - "properties": { - "$ref": "#/definitions/WebServiceProperties", - "description": "Contains the property payload that describes the web service." - } + "$ref": "#/definitions/WebServiceProperties", + "description": "Contains the property payload that describes the web service." }, "required": [ "properties" @@ -503,10 +501,8 @@ } ], "properties": { - "properties": { - "$ref": "#/definitions/WebServiceProperties", - "description": "Contains the property payload that describes the web service." - } + "$ref": "#/definitions/WebServiceProperties", + "description": "Contains the property payload that describes the web service." } }, "WebServiceProperties": { From 326b297b3e26dd8b7936edb1b815df27c015914a Mon Sep 17 00:00:00 2001 From: "Xin Zou (AI PLATFORM)" Date: Tue, 19 Mar 2019 14:11:31 +0800 Subject: [PATCH 6/6] revert last commit --- .../stable/2017-01-01/webservices.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json index 02162cc9fdca..3061906d2b5c 100644 --- a/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json +++ b/specification/machinelearning/resource-manager/Microsoft.MachineLearning/stable/2017-01-01/webservices.json @@ -485,8 +485,10 @@ } ], "properties": { - "$ref": "#/definitions/WebServiceProperties", - "description": "Contains the property payload that describes the web service." + "properties": { + "$ref": "#/definitions/WebServiceProperties", + "description": "Contains the property payload that describes the web service." + } }, "required": [ "properties" @@ -501,8 +503,10 @@ } ], "properties": { - "$ref": "#/definitions/WebServiceProperties", - "description": "Contains the property payload that describes the web service." + "properties": { + "$ref": "#/definitions/WebServiceProperties", + "description": "Contains the property payload that describes the web service." + } } }, "WebServiceProperties": {