Open nguerrera opened 4 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @dfulcer.
I think I found another one in the same service:
LanguageResult here: https://github.com/Azure/azure-rest-api-specs/blob/2e7ca21a5ad6f749e5bd453580f1c31c1d99b4e6/specification/cognitiveservices/data-plane/TranslatorText/stable/v3.0/TranslatorText.json#L642
does not appear to match: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-languages
Spec seems to say we'll get back something like this:
{
"translation": {
"languageCode": {
"name": "Afrikaan",
"nativeName": "Afrikaans",
"dir": "ltr"
}
}
}
but the actual response looks like this:
Rather than one single, literal "languageCode", we have a property for each language code.
If I'm not misunderstanding these, it seems the entire spec should be reviewed for similar issues.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @swmachan.
I discovered this when the JavaScript SDK gave me an array of DetectResultItem back from a call to
TranslatorText.detect
:That did not match the actual objects returned, which were instead as documented:
It appears that the API spec here is incorrect:
https://github.com/Azure/azure-rest-api-specs/blob/2e7ca21a5ad6f749e5bd453580f1c31c1d99b4e6/specification/cognitiveservices/data-plane/TranslatorText/stable/v3.0/TranslatorText.json#L176
https://github.com/Azure/azure-rest-api-specs/blob/2e7ca21a5ad6f749e5bd453580f1c31c1d99b4e6/specification/cognitiveservices/data-plane/TranslatorText/stable/v3.0/TranslatorText.json#L996-L1007