Skip to content

Commit

Permalink
ComputerVision - collection of fixes (#3145)
Browse files Browse the repository at this point in the history
* fix ocr language parameter to fix [bug](Azure/azure-sdk-for-net#4083)
* language parameter missing for /tag path
* language parameter missing for /models/*/analyze path
* make /models/*/analyze return a more generic type
* add specific types for /models/*/analyze to return for current models
  • Loading branch information
cthrash authored and anuchandy committed Jun 5, 2018
1 parent 749fe61 commit 91ed1c0
Showing 1 changed file with 54 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,10 @@
"in": "path",
"description": "The domain-specific content to recognize.",
"required": true,
"type": "string",
"x-nullable": false,
"x-ms-enum": {
"name": "DomainModels",
"modelAsString": false
},
"enum": [
"Celebrities",
"Landmarks"
]
"type": "string"
},
{
"$ref": "#/parameters/ServiceLanguage"
},
{
"$ref": "../../../Common/Parameters.json#/parameters/ImageUrl"
Expand Down Expand Up @@ -663,6 +657,9 @@
"application/json"
],
"parameters": [
{
"$ref": "#/parameters/ServiceLanguage"
},
{
"$ref": "../../../Common/Parameters.json#/parameters/ImageStream"
}
Expand Down Expand Up @@ -707,6 +704,9 @@
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/ServiceLanguage"
},
{
"$ref": "../../../Common/Parameters.json#/parameters/ImageStream"
}
Expand Down Expand Up @@ -895,7 +895,8 @@
"type": "object",
"properties": {
"language": {
"$ref": "#/definitions/OcrResult"
"type": "string",
"description": "The BCP-47 language code of the text in the image."
},
"textAngle": {
"type": "number",
Expand Down Expand Up @@ -997,7 +998,8 @@
"properties": {
"result": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DomainModelResult"
"type": "object",
"description": "Model-specific response"
},
"requestId": {
"type": "string",
Expand All @@ -1008,15 +1010,53 @@
}
}
},
"DomainModelResult": {
"CelebrityResults": {
"type": "object",
"description": "List of celebrities recognized in the image.",
"properties": {
"celebrities": {
"type": "array",
"description": "An array of possible celebritied identified in the image.",
"items": {
"$ref": "#/definitions/CelebritiesModel"
}
},
"requestId": {
"type": "string",
"description": "Id of the REST API request."
},
"metadata": {
"$ref": "#/definitions/ImageMetadata"
}
}
},
"LandmarkResults": {
"type": "object",
"description": "List of landmarks recognized in the image.",
"properties": {
"landmarks": {
"type": "array",
"items": {
"type": "object",
"description": "A landmark recognized in the image",
"properties": {
"name": {
"type": "string",
"description": "Name of the landmark."
},
"confidence": {
"type": "number",
"format": "double",
"description": "Confidence level for the landmark recognition."
}
}
}
},
"requestId": {
"type": "string",
"description": "Id of the REST API request."
},
"metadata": {
"$ref": "#/definitions/ImageMetadata"
}
}
},
Expand Down

0 comments on commit 91ed1c0

Please sign in to comment.