Skip to content

Commit

Permalink
Enable Computer Vision Client to customize endpoint. (#3440)
Browse files Browse the repository at this point in the history
* Enable Computer Vision Client to customize endpoint.

* Update Corresponding examples.
  • Loading branch information
yangyuan authored and sergey-shandar committed Jul 20, 2018
1 parent eddee65 commit 6a7eb1d
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ nodejs:
package-name: azure-cognitiveservices-computervision
package-version: 2.0.0-preview
output-folder: $(node-sdks-folder)/lib/services/computerVision
override-client-name: ComputerVisionAPIClient
azure-arm: false
generate-license-txt: true
generate-package-json: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
]
},
Expand Down Expand Up @@ -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",
"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
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"visualFeatures": ["Categories", "Adult", "Tags", "Description", "Faces", "Color", "ImageType"],
"details": "Celebrities",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"visualFeatures": "Categories,Adult,Tags,Description,Faces,Color,ImageType",
"details": "Celebrities,Landmarks",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"maxCandidates": "1",
"Image": "{binary}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"maxCandidates": "1",
"ImageUrl": "{url}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"model": "Celebrities",
"Image": "{binary}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"model": "Celebrities",
"ImageUrl": "{url}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"width": "500",
"height": "500",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"width": "500",
"height": "500",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"operationId": "49a36324-fc4b-4387-aa06-090cfbf0064f"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}"
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"detectOrientation": "true",
"language": "en",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"detectOrientation": "true",
"language": "en",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"mode": "Handwritten",
"Image": "{binary}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"mode": "Handwritten",
"ImageUrl": "{url}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"Image": "{binary}"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parameters": {
"AzureRegion": "Westus",
"Endpoint": "https://westus.api.cognitive.microsoft.com/vision/v2.0",
"Ocp-Apim-Subscription-Key": "{API key}",
"ImageUrl": "{url}"
},
Expand Down

0 comments on commit 6a7eb1d

Please sign in to comment.