-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Added the folder for Translator and the Open API file for Text Translation API V3 #3705
Conversation
Automation for azure-sdk-for-pythonEncountered a Subprocess error: (azure-sdk-for-python)
Command: ['/usr/local/bin/autorest', '/tmp/tmpxbba3_0f/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpktdj7ist'] AutoRest code generation utility [version: 2.0.4283; node: v8.11.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4284)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
- file:///tmp/tmpxbba3_0f/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md:112:4
[OperationAbortedException] Error occurred. Exiting. |
Automation for azure-sdk-for-goEncountered a Subprocess error: (azure-sdk-for-go)
Command: ['/usr/local/bin/autorest', '/tmp/tmpodjstidt/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmp0rdycswj'] AutoRest code generation utility [version: 2.0.4283; node: v8.11.4]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4283)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
- file:///tmp/tmpodjstidt/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md:112:4
[OperationAbortedException] Error occurred. Exiting. |
Automation for azure-sdk-for-rubyEncountered a Subprocess error: (azure-sdk-for-ruby)
Command: ['/usr/local/bin/autorest', '/tmp/tmpj9bsr5bi/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpwxm_oj0m'] AutoRest code generation utility [version: 2.0.4283; node: v8.11.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4284)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
- file:///tmp/tmpj9bsr5bi/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md:112:4
[OperationAbortedException] Error occurred. Exiting. |
Can one of the admins verify this patch? |
Automation for azure-sdk-for-nodeEncountered a Subprocess error: (azure-sdk-for-node)
Command: ['/usr/local/bin/autorest', '/tmp/tmp5znxb86a/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmp81xpp6vn'] AutoRest code generation utility [version: 2.0.4283; node: v8.11.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4283)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
- file:///tmp/tmp5znxb86a/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md:112:4
[OperationAbortedException] Error occurred. Exiting. |
Automation for azure-sdk-for-javaEncountered a Subprocess error: (azure-sdk-for-java)
Command: ['/usr/local/bin/autorest', '/tmp/tmplt__u25v/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md', '--perform-load=false', '--swagger-to-sdk', '--output-artifact=configuration.json', '--input-file=foo', '--output-folder=/tmp/tmpfdcyas9n'] AutoRest code generation utility [version: 2.0.4283; node: v8.11.3]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Loading AutoRest core '/root/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4283)
ERROR: Syntax Error Encountered: Syntax error: can not read a block mapping entry; a multiline key may not be an implicit key
- file:///tmp/tmplt__u25v/rest/specification/cognitiveservices/data-plane/TranslatorText/v3.0/readme.md:112:4
[OperationAbortedException] Error occurred. Exiting. |
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.
The empty README.md files are causing various processes to fail and need to be fixed.
Empty readme files causing problems. Fixing. |
"swagger": "2.0", | ||
"info": { | ||
"version": "3.0", | ||
"title": "Translator Text API", |
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.
Title will be used for client class name
Please change to "Translator Text Client" to keep consistent with other Cognitive Services.
@@ -0,0 +1,930 @@ | |||
{ |
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.
I noticed some places we call the service "Translator Text" some places we call it "Text Translation".
We should use same term.
If "Translator Text" is the official service name, in here, the path should be:
specification/cognitiveservices/data-plane/TranslatorText/v3.0/TranslatorText.json
TextTranslation => TranslatorText
V3 => v3.0
TextTranslationV3.json => TranslatorText.json
@@ -0,0 +1,3 @@ | |||
# Microsoft Translator API V3 |
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.
Readme.md => readme.md :)
This file is not a simple readme file. This is actually a configuration/metadata file for generating SDK.
Please refer the example in
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/readme.md
to write an autorest compatible readme.
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.
Yes please be sure to use lower-case in the file name. Also the file format is incorrect and is still causing breaks, please see the logs for details.
Made the fixes to the Open API file and the Readme.md files. |
@@ -0,0 +1,4 @@ | |||
# Microsoft Translator API V3 |
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.
You'll need to rename this file to something else as readme.md
has special meaning in this repo. Or just remove it entirely as I don't know how much value it provides regarding swagger generation.
"200": { | ||
"description": "OK" | ||
}, | ||
"400": { |
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.
It isn't necessary to define all these error cases, just use a default
response for them. Example here.
Changed the readme.md file name to info.md |
Examples are missing for the operations, see example here. |
The examples don't have to be huge, just enough to convey what a request and response can look like. Building on my previous example link, see the details of an example file here. |
@kellyaltom any update? |
If you think the work is roughly a week out yeah let's close it for now, you can reopen it when ready or create a new one (whatever works best for you). |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-version
in the path should match theapi-version
in the spec).Quality of Swagger