-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Computer Vision Client to customize endpoint. #3440
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"swagger": "2.0", | ||
"info": { | ||
"version": "2.0", | ||
"title": "Computer Vision API", | ||
"title": "Computer Vision Client", | ||
"description": "The Computer Vision API provides state-of-the-art algorithms to process images and return information. For example, it can be used to determine if an image contains mature content, or it can be used to find all the faces in an image. It also has other features like estimating dominant and accent colors, categorizing the content of images, and describing an image with complete English sentences. Additionally, it can also intelligently generate images thumbnails for displaying large images effectively." | ||
}, | ||
"securityDefinitions": { | ||
|
@@ -18,10 +18,11 @@ | |
} | ||
], | ||
"x-ms-parameterized-host": { | ||
"hostTemplate": "{AzureRegion}.api.cognitive.microsoft.com", | ||
"hostTemplate": "{Endpoint}", | ||
"useSchemePrefix": false, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/AzureRegion" | ||
"$ref": "#/parameters/Endpoint" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Endpoint has to be "$ref", otherwise, it behaves like "x-ms-parameter-location": "method". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you'll have to update all the examples, (like this). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cthrash Thanks, didn't know about the examples, they are now updated. |
||
} | ||
] | ||
}, | ||
|
@@ -1554,32 +1555,14 @@ | |
"format": "file" | ||
} | ||
}, | ||
"AzureRegion": { | ||
"name": "AzureRegion", | ||
"description": "Supported Azure regions for Cognitive Services endpoints", | ||
"Endpoint": { | ||
"name": "Endpoint", | ||
"description": "Supported Cognitive Services endpoints", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine for now but would be great if there is a URL in here pointing users to a doc where he/she would be able to get the endpoint. |
||
"x-ms-parameter-location": "client", | ||
"required": true, | ||
"type": "string", | ||
"in": "path", | ||
"x-ms-skip-url-encoding": true, | ||
"x-ms-enum": { | ||
"name": "AzureRegions", | ||
"modelAsString": false | ||
}, | ||
"enum": [ | ||
"westus", | ||
"westeurope", | ||
"southeastasia", | ||
"eastus2", | ||
"westcentralus", | ||
"westus2", | ||
"eastus", | ||
"southcentralus", | ||
"northeurope", | ||
"eastasia", | ||
"australiaeast", | ||
"brazilsouth" | ||
] | ||
"x-ms-skip-url-encoding": true | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "override-client-name" since the Client name now naturally ends with "Client"