From d63c9588abf1077e8316af1db4dabb2bb03efb2f Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 12:33:12 -0700 Subject: [PATCH 1/6] add stream as return type for get model --- .../preview/v1.0/Personalizer.json | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json index 88a3a5f1320b..063ec80f52f0 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json @@ -509,14 +509,17 @@ ], "produces": [ - + "application/json" ], "parameters": [ ], "responses": { "204": { - "description": "Success" + "description": "Success", + "schema": { + "$ref": "#/definitions/Stream" + } }, "default": { "description": "*** Error Responses: ***\\n\\n * 400 Invalid arguments.\\n\\n * 404 ResourceNotFound." @@ -858,6 +861,44 @@ } } }, + "Stream": { + "type": "object", + "properties": { + "canRead": { + "type": "boolean", + "readOnly": true + }, + "canSeek": { + "type": "boolean", + "readOnly": true + }, + "canTimeout": { + "type": "boolean", + "readOnly": true + }, + "canWrite": { + "type": "boolean", + "readOnly": true + }, + "length": { + "format": "int64", + "type": "integer", + "readOnly": true + }, + "position": { + "format": "int64", + "type": "integer" + }, + "readTimeout": { + "format": "int32", + "type": "integer" + }, + "writeTimeout": { + "format": "int32", + "type": "integer" + } + } + }, "ModelProperties": { "type": "object", "properties": { From 5f1c7e7610de89aa901d37bdaddda14d3c40d216 Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 13:01:19 -0700 Subject: [PATCH 2/6] fix response type for correct op --- .../Personalizer/preview/v1.0/Personalizer.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json index 063ec80f52f0..73fb096988a9 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json @@ -489,6 +489,7 @@ "200": { "description": "Success", "schema": { + "$ref": "#/definitions/Stream", "type": "file" } } @@ -509,17 +510,14 @@ ], "produces": [ - "application/json" + ], "parameters": [ ], "responses": { "204": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Stream" - } + "description": "Success" }, "default": { "description": "*** Error Responses: ***\\n\\n * 400 Invalid arguments.\\n\\n * 404 ResourceNotFound." From 643d231a3ba3c0feeddd3b193a1b6b09891a1013 Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 13:08:31 -0700 Subject: [PATCH 3/6] change type file to stream --- .../data-plane/Personalizer/preview/v1.0/Personalizer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json index 73fb096988a9..1cd52f4d9eb3 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json @@ -490,7 +490,7 @@ "description": "Success", "schema": { "$ref": "#/definitions/Stream", - "type": "file" + "type": "object" } } }, From 9a11fb9e2d7af75268dc9d9d1470c6d89f71846b Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 13:31:20 -0700 Subject: [PATCH 4/6] remove stream ref --- .../preview/v1.0/Personalizer.json | 41 +------------------ 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json index 1cd52f4d9eb3..88a3a5f1320b 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json +++ b/specification/cognitiveservices/data-plane/Personalizer/preview/v1.0/Personalizer.json @@ -489,8 +489,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/Stream", - "type": "object" + "type": "file" } } }, @@ -859,44 +858,6 @@ } } }, - "Stream": { - "type": "object", - "properties": { - "canRead": { - "type": "boolean", - "readOnly": true - }, - "canSeek": { - "type": "boolean", - "readOnly": true - }, - "canTimeout": { - "type": "boolean", - "readOnly": true - }, - "canWrite": { - "type": "boolean", - "readOnly": true - }, - "length": { - "format": "int64", - "type": "integer", - "readOnly": true - }, - "position": { - "format": "int64", - "type": "integer" - }, - "readTimeout": { - "format": "int32", - "type": "integer" - }, - "writeTimeout": { - "format": "int32", - "type": "integer" - } - } - }, "ModelProperties": { "type": "object", "properties": { From 84fa49f33bed57366dcb0bd8706c11e4b0e6c578 Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 14:27:06 -0700 Subject: [PATCH 5/6] Adding all sync methods to Personalizer API --- .../cognitiveservices/data-plane/Personalizer/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/cognitiveservices/data-plane/Personalizer/readme.md b/specification/cognitiveservices/data-plane/Personalizer/readme.md index b8ebd0947eca..950dcaeafc9d 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/readme.md +++ b/specification/cognitiveservices/data-plane/Personalizer/readme.md @@ -48,5 +48,6 @@ csharp: azure-arm: false namespace: Microsoft.Azure.CognitiveServices.Personalizer output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Personalizer/Generated + sync-methods: all clear-output-folder: true ``` \ No newline at end of file From a81031d6e94971530ffbeadc7e7fbcc2fe6dc067 Mon Sep 17 00:00:00 2001 From: Dwaipayan Mukherjee Date: Fri, 26 Apr 2019 14:46:35 -0700 Subject: [PATCH 6/6] Adding all sync methods to Personalizer API --- .../cognitiveservices/data-plane/Personalizer/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Personalizer/readme.md b/specification/cognitiveservices/data-plane/Personalizer/readme.md index 950dcaeafc9d..149333c3217f 100644 --- a/specification/cognitiveservices/data-plane/Personalizer/readme.md +++ b/specification/cognitiveservices/data-plane/Personalizer/readme.md @@ -43,7 +43,6 @@ swagger-to-sdk: These settings apply only when `--csharp` is specified on the command line. ``` yaml $(csharp) csharp: - sync-methods: None license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false namespace: Microsoft.Azure.CognitiveServices.Personalizer