-
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
ComputerVision - collection of fixes #3145
Changes from all commits
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 |
---|---|---|
|
@@ -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" | ||
|
@@ -663,6 +657,9 @@ | |
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ServiceLanguage" | ||
}, | ||
{ | ||
"$ref": "../../../Common/Parameters.json#/parameters/ImageStream" | ||
} | ||
|
@@ -707,6 +704,9 @@ | |
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ServiceLanguage" | ||
}, | ||
{ | ||
"$ref": "../../../Common/Parameters.json#/parameters/ImageStream" | ||
} | ||
|
@@ -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." | ||
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. is this a breaking change in the server side? i.e. returning string instead of complex type? 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. No the server for this type is unchanged for 2+ years. The swagger was just wrong. 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. A bit of background - up to now most of our customers have been using a hand-built .net client SDK. We're bringing the swagger to par so that this will be the official package source moving forward. 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 thank you Chris for clarifying. |
||
}, | ||
"textAngle": { | ||
"type": "number", | ||
|
@@ -997,7 +998,8 @@ | |
"properties": { | ||
"result": { | ||
"x-ms-client-flatten": true, | ||
"$ref": "#/definitions/DomainModelResult" | ||
"type": "object", | ||
"description": "Model-specific response" | ||
}, | ||
"requestId": { | ||
"type": "string", | ||
|
@@ -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" | ||
} | ||
} | ||
}, | ||
|
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.
Any specific reason to use raw string instead of enum? Are we are doing this to ensure customer can use SDK with content values those are not listed as known enum values (Celebrities, Landmarks)? If yes, then we could simply change
"modelAsString": false
to"modelAsString": 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.
Today we only have two custom (domain) models, but we want to reserve the right to add one without requiring a client SDK refresh. There's a method (
/model
) that will return the permissible values. Note that the hand-crafted version only takes a string.