Skip to content
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

Closed
wants to merge 23 commits into from

Conversation

kellyaltom
Copy link

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

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@msftclas
Copy link

msftclas commented Aug 22, 2018

CLA assistant check
All CLA requirements met.

@AutorestCI
Copy link

AutorestCI commented Aug 22, 2018

Automation for azure-sdk-for-python

Encountered 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']
Finished with return code 1
and output:

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.

@AutorestCI
Copy link

AutorestCI commented Aug 22, 2018

Automation for azure-sdk-for-go

Encountered 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']
Finished with return code 1
and output:

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.

@AutorestCI
Copy link

AutorestCI commented Aug 22, 2018

Automation for azure-sdk-for-ruby

Encountered 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']
Finished with return code 1
and output:

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.

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@AutorestCI
Copy link

AutorestCI commented Aug 22, 2018

Automation for azure-sdk-for-node

Encountered 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']
Finished with return code 1
and output:

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.

@AutorestCI
Copy link

AutorestCI commented Aug 22, 2018

Automation for azure-sdk-for-java

Encountered 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']
Finished with return code 1
and output:

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.

Copy link
Member

@jhendrixMSFT jhendrixMSFT left a 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.

@kellyaltom kellyaltom closed this Aug 22, 2018
@kellyaltom
Copy link
Author

Empty readme files causing problems. Fixing.

@kellyaltom
Copy link
Author

kellyaltom commented Aug 22, 2018 via email

"swagger": "2.0",
"info": {
"version": "3.0",
"title": "Translator Text API",
Copy link
Member

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 @@
{
Copy link
Member

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
Copy link
Member

@yangyuan yangyuan Aug 22, 2018

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.

Copy link
Member

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.

@kellyaltom kellyaltom reopened this Aug 22, 2018
@kellyaltom
Copy link
Author

Made the fixes to the Open API file and the Readme.md files.

@@ -0,0 +1,4 @@
# Microsoft Translator API V3
Copy link
Member

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": {
Copy link
Member

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.

@kellyaltom
Copy link
Author

Changed the readme.md file name to info.md

@jhendrixMSFT
Copy link
Member

Examples are missing for the operations, see example here.

@kellyaltom
Copy link
Author

kellyaltom commented Aug 23, 2018 via email

@jhendrixMSFT
Copy link
Member

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.

@jhendrixMSFT
Copy link
Member

@kellyaltom any update?

@kellyaltom
Copy link
Author

kellyaltom commented Aug 31, 2018 via email

@jhendrixMSFT
Copy link
Member

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).

@kellyaltom kellyaltom closed this Aug 31, 2018
@yangyuan yangyuan mentioned this pull request Feb 19, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants