From 691d031c2cdc46de0d5b372f5c9b7726b1609714 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Fri, 5 Jul 2019 14:17:11 +0530 Subject: [PATCH 1/7] Updated QnAMaker Runtime API headers descriptions --- .../QnAMaker/stable/v4.0/QnAMakerRuntime.json | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json index 2fd792ca1d99..6ac18bc7044e 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json @@ -5,18 +5,6 @@ "title": "QnAMaker Client", "description": "An API for QnAMaker runtime" }, - "securityDefinitions": { - "auth_key": { - "type": "apiKey", - "name": "Authorization", - "in": "header" - } - }, - "security": [ - { - "auth_key": [] - } - ], "x-ms-parameterized-host": { "hostTemplate": "{RuntimeEndpoint}/qnamaker", "useSchemePrefix": false, @@ -40,6 +28,12 @@ }, { "$ref": "#/parameters/GenerateAnswerPayload" + }, + { + "$ref": "#/parameters/EndpointKeyHeader" + }, + { + "$ref": "#/parameters/ContentTypeHeader" } ], "consumes": [ @@ -82,6 +76,12 @@ }, { "$ref": "#/parameters/TrainPayload" + }, + { + "$ref": "#/parameters/EndpointKeyHeader" + }, + { + "$ref": "#/parameters/ContentTypeHeader" } ], "consumes": [ @@ -390,7 +390,7 @@ "type": "array", "description": "Represents Search Result list.", "items": { - "$ref": "#/definitions/QnASearchResult" + "$ref": "#/definitions/QnASearchResult" } } } @@ -428,8 +428,8 @@ "type": "array", "description": "List of metadata.", "items": { - "$ref": "#/definitions/MetadataDTO" - } + "$ref": "#/definitions/MetadataDTO" + } }, "context": { "type": "object", @@ -519,6 +519,20 @@ "x-nullable": true, "description": "Post body of the request.", "x-ms-parameter-location": "method" + }, + "EndpointKeyHeader": { + "name": "Authorization", + "in": "header", + "description": "Authorization header with Primary/Secondary Endpoint Key of Runtime (for example: EndpointKey 8739caf6-8d95-4395-a020-904ae576f7c4)", + "required": true, + "type": "string" + }, + "ContentTypeHeader": { + "name": "Content-Type", + "in": "header", + "description": "application/json", + "required": true, + "type": "string" } } } From 7771bfe50ece883e3f0814bd05a04d655f569fbd Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Mon, 8 Jul 2019 16:09:48 +0530 Subject: [PATCH 2/7] Update swagger title --- .../data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json index 6ac18bc7044e..57c2595946cf 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "4.0", - "title": "QnAMaker Client", + "title": "QnAMaker Runtime Client", "description": "An API for QnAMaker runtime" }, "x-ms-parameterized-host": { From 570871643bb00477462dd2cdbdd789d2c16f3be1 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Mon, 8 Jul 2019 18:48:41 +0530 Subject: [PATCH 3/7] removed content-type header --- .../QnAMaker/stable/v4.0/QnAMakerRuntime.json | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json index 57c2595946cf..91e61a122353 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json @@ -31,9 +31,6 @@ }, { "$ref": "#/parameters/EndpointKeyHeader" - }, - { - "$ref": "#/parameters/ContentTypeHeader" } ], "consumes": [ @@ -79,9 +76,6 @@ }, { "$ref": "#/parameters/EndpointKeyHeader" - }, - { - "$ref": "#/parameters/ContentTypeHeader" } ], "consumes": [ @@ -526,13 +520,6 @@ "description": "Authorization header with Primary/Secondary Endpoint Key of Runtime (for example: EndpointKey 8739caf6-8d95-4395-a020-904ae576f7c4)", "required": true, "type": "string" - }, - "ContentTypeHeader": { - "name": "Content-Type", - "in": "header", - "description": "application/json", - "required": true, - "type": "string" } } } From 89c6409d9bdbe67a69d32ed6ec80b2f23faa5db7 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Tue, 16 Jul 2019 13:41:57 +0530 Subject: [PATCH 4/7] Common tag and title for Runtime Undo Authorization header change --- .../data-plane/QnAMaker/readme.md | 18 ++-------- .../QnAMaker/stable/v4.0/QnAMakerRuntime.json | 33 +++++++++---------- 2 files changed, 19 insertions(+), 32 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md index 65005674ef5b..1dddb73d9153 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -18,23 +18,11 @@ openapi-type: data-plane These settings apply only when `--tag=release_4_0` is specified on the command line. ``` yaml $(tag) == 'release_4_0' -input-file: stable/v4.0/QnAMaker.json +input-file: + - "stable/v4.0/QnAMaker.json" + - "stable/v4.0/QnAMakerRuntime.json" ``` -``` yaml - -tag: runtime_release_4_0 -add-credentials: true -openapi-type: data-plane -``` -# Runtime Releases - -### Runtime Release 4.0 -These settings apply only when `--tag=runtime_release_4_0` is specified on the command line. - -``` yaml $(tag) == 'runtime_release_4_0' -input-file: stable/v4.0/QnAMakerRuntime.json -``` ## Swagger to SDK diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json index 91e61a122353..2fd792ca1d99 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json @@ -2,9 +2,21 @@ "swagger": "2.0", "info": { "version": "4.0", - "title": "QnAMaker Runtime Client", + "title": "QnAMaker Client", "description": "An API for QnAMaker runtime" }, + "securityDefinitions": { + "auth_key": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "security": [ + { + "auth_key": [] + } + ], "x-ms-parameterized-host": { "hostTemplate": "{RuntimeEndpoint}/qnamaker", "useSchemePrefix": false, @@ -28,9 +40,6 @@ }, { "$ref": "#/parameters/GenerateAnswerPayload" - }, - { - "$ref": "#/parameters/EndpointKeyHeader" } ], "consumes": [ @@ -73,9 +82,6 @@ }, { "$ref": "#/parameters/TrainPayload" - }, - { - "$ref": "#/parameters/EndpointKeyHeader" } ], "consumes": [ @@ -384,7 +390,7 @@ "type": "array", "description": "Represents Search Result list.", "items": { - "$ref": "#/definitions/QnASearchResult" + "$ref": "#/definitions/QnASearchResult" } } } @@ -422,8 +428,8 @@ "type": "array", "description": "List of metadata.", "items": { - "$ref": "#/definitions/MetadataDTO" - } + "$ref": "#/definitions/MetadataDTO" + } }, "context": { "type": "object", @@ -513,13 +519,6 @@ "x-nullable": true, "description": "Post body of the request.", "x-ms-parameter-location": "method" - }, - "EndpointKeyHeader": { - "name": "Authorization", - "in": "header", - "description": "Authorization header with Primary/Secondary Endpoint Key of Runtime (for example: EndpointKey 8739caf6-8d95-4395-a020-904ae576f7c4)", - "required": true, - "type": "string" } } } From a2a4140c1001250e4be0e684bd5bd2b7ba762a67 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Tue, 16 Jul 2019 14:08:18 +0530 Subject: [PATCH 5/7] Update title --- .../data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json index 2fd792ca1d99..adc3dd313096 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "4.0", - "title": "QnAMaker Client", + "title": "QnAMaker Runtime Client", "description": "An API for QnAMaker runtime" }, "securityDefinitions": { From 1533fcb243313f84f51e342db23bcedddc6727ea Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Tue, 16 Jul 2019 14:33:32 +0530 Subject: [PATCH 6/7] update readme --- .../data-plane/QnAMaker/readme.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md index 1dddb73d9153..3b3e7725e589 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -18,11 +18,22 @@ openapi-type: data-plane These settings apply only when `--tag=release_4_0` is specified on the command line. ``` yaml $(tag) == 'release_4_0' -input-file: - - "stable/v4.0/QnAMaker.json" - - "stable/v4.0/QnAMakerRuntime.json" +input-file: stable/v4.0/QnAMaker.json ``` +``` yaml +tag: release_4_0 +add-credentials: true +openapi-type: data-plane +``` +# Runtime Releases + +### Runtime Release 4.0 +These settings apply only when `--tag=release_4_0` is specified on the command line. + +``` yaml $(tag) == 'release_4_0' +input-file: stable/v4.0/QnAMakerRuntime.json +``` ## Swagger to SDK From 70d1ba468a6326d9c7a2ac7db2d7d0a7438896d1 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Tue, 23 Jul 2019 14:15:04 +0530 Subject: [PATCH 7/7] update readme --- .../cognitiveservices/data-plane/QnAMaker/readme.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.md index 3b3e7725e589..20e211352a55 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.md @@ -22,19 +22,25 @@ input-file: stable/v4.0/QnAMaker.json ``` ``` yaml -tag: release_4_0 +tag: runtime_release_4_0 add-credentials: true openapi-type: data-plane ``` # Runtime Releases ### Runtime Release 4.0 -These settings apply only when `--tag=release_4_0` is specified on the command line. +These settings apply only when `--tag=runtime_release_4_0` is specified on the command line. -``` yaml $(tag) == 'release_4_0' +``` yaml $(tag) == 'runtime_release_4_0' input-file: stable/v4.0/QnAMakerRuntime.json ``` +``` yaml +batch: + - tag: release_4_0 + - tag: runtime_release_4_0 +``` + ## Swagger to SDK This section describes what SDK should be generated by the automatic system.