Skip to content

Commit dc782b3

Browse files
yangyuanpraries880
authored andcommitted
[CognitiveServices] enable Bing Search/CustomSearch products to specify Endpoint (#4401)
1 parent a079367 commit dc782b3

File tree

11 files changed

+122
-22
lines changed

11 files changed

+122
-22
lines changed

specification/cognitiveservices/data-plane/AutoSuggest/stable/v1.0/AutoSuggest.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "AutoSuggest Search API",
4+
"title": "AutoSuggest Client",
55
"description": "The AutoSuggest Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the web for AutoSuggest](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference).",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/Common/Parameters.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
},
88
"paths": {},
99
"parameters": {
10+
"GlobalEndpoint": {
11+
"name": "Endpoint",
12+
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example: \"https://westus.api.cognitive.microsoft.com\", \"https://api.cognitive.microsoft.com\").",
13+
"x-ms-parameter-location": "client",
14+
"required": true,
15+
"type": "string",
16+
"in": "path",
17+
"x-ms-skip-url-encoding": true,
18+
"default": "https://api.cognitive.microsoft.com"
19+
},
1020
"ImageStream": {
1121
"name": "Image",
1222
"in": "body",

specification/cognitiveservices/data-plane/CustomImageSearch/stable/v1.0/CustomImageSearch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bingcustomsearch/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/CustomWebSearch/stable/v1.0/CustomSearch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"schemes": [
2736
"https"

specification/cognitiveservices/data-plane/EntitySearch/stable/v1.0/EntitySearch.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Entity Search API",
4+
"title": "Entity Search Client",
55
"description": "The Entity Search API lets you send a search query to Bing and get back search results that include entities and places. Place results include restaurants, hotel, or other local businesses. For places, the query can specify the name of the local business or it can ask for a list (for example, restaurants near me). Entity results include persons, places, or things. Place in this context is tourist attractions, states, countries, etc.",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"schemes": [
2736
"https"
@@ -210,9 +219,9 @@
210219
}
211220
},
212221
"x-ms-examples": {
213-
"Successful query": {
214-
"$ref": "./examples//SuccessfulQueryRequest.json"
215-
}
222+
"Successful query": {
223+
"$ref": "./examples//SuccessfulQueryRequest.json"
224+
}
216225
}
217226
}
218227
}

specification/cognitiveservices/data-plane/ImageSearch/stable/v1.0/ImageSearch.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Image Search API",
4+
"title": "Image Search Client",
55
"description": "The Image Search API lets you send a search query to Bing and get back a list of relevant images. This section provides technical details about the query parameters and headers that you use to request images and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the Web for Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web).",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/NewsSearch/stable/v1.0/NewsSearch.json

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "News Search API",
4+
"title": "News Search Client",
55
"description": "The News Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the web for news](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-news-search/search-the-web).",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [
@@ -241,9 +250,9 @@
241250
}
242251
},
243252
"x-ms-examples": {
244-
"Successful query": {
245-
"$ref": "./examples//SuccessfulNewsSearchRequest.json"
246-
}
253+
"Successful query": {
254+
"$ref": "./examples//SuccessfulNewsSearchRequest.json"
255+
}
247256
}
248257
}
249258
},
@@ -429,9 +438,9 @@
429438
}
430439
},
431440
"x-ms-examples": {
432-
"Successful query": {
433-
"$ref": "./examples//SuccessfulNewsCategoryRequest.json"
434-
}
441+
"Successful query": {
442+
"$ref": "./examples//SuccessfulNewsCategoryRequest.json"
443+
}
435444
}
436445
}
437446
},
@@ -609,9 +618,9 @@
609618
}
610619
},
611620
"x-ms-examples": {
612-
"Successful query": {
613-
"$ref": "./examples//SuccessfulNewsTrendingRequest.json"
614-
}
621+
"Successful query": {
622+
"$ref": "./examples//SuccessfulNewsTrendingRequest.json"
623+
}
615624
}
616625
}
617626
}

specification/cognitiveservices/data-plane/SpellCheck/stable/v1.0/SpellCheck.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/VideoSearch/stable/v1.0/VideoSearch.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Video Search API",
4+
"title": "Video Search Client",
55
"description": "The Video Search API lets you search on Bing for video that are relevant to the user's search query, for insights about a video or for videos that are trending based on search requests made by others. This section provides technical details about the query parameters and headers that you use to request videos and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the Web for Videos](https://docs.microsoft.com/azure/cognitive-services/bing-video-search/search-the-web).",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/VisualSearch/preview/v1.0/VisualSearch.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Visual Search API",
4+
"title": "Visual Search Client",
55
"description": "Visual Search API lets you discover insights about an image such as visually similar images, shopping sources, and related searches. The API can also perform text recognition, identify entities (people, places, things), return other topical content for the user to explore, and more. For more information, see [Visual Search Overview](https://docs.microsoft.com/azure/cognitive-services/bing-visual-search/overview).",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [

specification/cognitiveservices/data-plane/WebSearch/stable/v1.0/WebSearch.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "Web Search API",
4+
"title": "Web Search Client",
55
"description": "The Web Search API lets you send a search query to Bing and get back search results that include links to webpages, images, and more.",
66
"version": "1.0"
77
},
@@ -22,6 +22,15 @@
2222
]
2323
}
2424
},
25+
"x-ms-parameterized-host": {
26+
"hostTemplate": "{Endpoint}",
27+
"useSchemePrefix": false,
28+
"parameters": [
29+
{
30+
"$ref": "../../../Common/Parameters.json#/parameters/GlobalEndpoint"
31+
}
32+
]
33+
},
2534
"host": "api.cognitive.microsoft.com",
2635
"basePath": "/bing/v7.0",
2736
"schemes": [
@@ -294,9 +303,9 @@
294303
}
295304
},
296305
"x-ms-examples": {
297-
"Successful query": {
298-
"$ref": "./examples//SuccessfulQueryRequest.json"
299-
}
306+
"Successful query": {
307+
"$ref": "./examples//SuccessfulQueryRequest.json"
308+
}
300309
}
301310
}
302311
}

0 commit comments

Comments
 (0)