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

Adding Definition for Microsoft Translation service #23231

Merged
merged 29 commits into from
Apr 3, 2023
Merged

Adding Definition for Microsoft Translation service #23231

merged 29 commits into from
Apr 3, 2023

Conversation

MikeyMCZ
Copy link
Member

Data Plane API - Pull Request

Adding definition for Text Translation service: Text translation is a cloud-based REST API feature of the Translator service that uses neural machine translation technology to enable quick and accurate source-to-target text translation in real time across all supported languages. In this overview, you'll learn how the Text Translation REST APIs enable you to build intelligent solutions for your applications and workflows.

API Info: The Basics

https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview

  • Link to engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

MikeyMCZ and others added 9 commits March 1, 2023 16:00
* Adding translator API definition

* Fixing PR comments, part 1

* Fixes and python

* Add versions

* fix PR comments

* fix operation definition

* Enable all operations and dotnet

* Fixes for languages API

* Double clients and new auth method

* PR comment fix

* Switch to custom operations

* Removing the APIM client

* Adding emitters

* Update api-version

* Updates to models

* Attempt to fix the api-version

* Fixing API version

* Fix dictionaries.

* Fix the models

* Models fixes

* Removing detect, fix breaksentence

* Adding examples

* Fixing languages endpoint

* Updating generation

---------

Co-authored-by: Michal Materna <[email protected]>
Co-authored-by: Catalina Peralta <[email protected]>
@openapi-workflow-bot
Copy link

Hi, @MikeyMCZ Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 22, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.
    compared tags (via openapi-validator v2.0.0) new version base version
    release_3_0 release_3_0(535c659) default(main)
    all-api-versions all-api-versions(535c659) default(main)
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️️✔️TypeSpec Validation succeeded [Detail] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 22, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking

    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Code Generator Failed [Logs]Release - Generate from 9f3ae9d. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      warn		specification/translation/data-plane/Azure.AI.TextTranslation/readme.md skipped due to azure-sdk-for-net-track2 not found in swagger-to-sdk
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mException: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:133
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 133 | �[0m             �[36;1mthrow "Not provide service name or namespace."�[0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mNot provide service name or namespace.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-net]: pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1
      warn	Skip package processing as generation is failed
    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 9f3ae9d. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      warn		specification/translation/data-plane/Azure.AI.TextTranslation/readme.md skipped due to azure-sdk-for-python not found in swagger-to-sdk
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh] npm notice
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.0 -> 9.6.3
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.3>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
      warn	No file changes detected after generation
      warn	No package detected after generation
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 9f3ae9d. SDK Automation 14.0.0
      command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
      warn		specification/translation/data-plane/Azure.AI.TextTranslation/readme.md skipped due to azure-sdk-for-java not found in swagger-to-sdk
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      warn	No file changes detected after generation
      warn	No package detected after generation
    ️❌ azure-sdk-for-js failed [Detail]
    • Pipeline Framework Failed [Logs]Release - Generate from 9f3ae9d. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      warn		specification/translation/data-plane/Azure.AI.TextTranslation/readme.md skipped due to azure-sdk-for-js not found in swagger-to-sdk
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
      cmderr	[automation_generate.sh] [ERROR] Error:
      cmderr	[automation_generate.sh] [ERROR] An error occurred while run build for typespec project: "specification/translation/Azure.AI.TextTranslation":
      cmderr	[automation_generate.sh] [ERROR] Err: Error: Find unexpected changed package directory. Length: [object Set]. Value: . Please only change files in one directory
      cmderr	[automation_generate.sh] [ERROR] Stderr: "undefined"
      cmderr	[automation_generate.sh] [ERROR] Stdout: "undefined"
      cmderr	[automation_generate.sh] [ERROR] ErrorStack: "Error: Find unexpected changed package directory. Length: [object Set]. Value: . Please only change files in one directory
      cmderr	[automation_generate.sh] [ERROR]     at Object.<anonymous> (/opt/hostedtoolcache/node/16.19.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/llc/generateRLCInPipeline/generateRLCInPipeline.js:164:27)
      cmderr	[automation_generate.sh] [ERROR]     at Generator.next (<anonymous>)
      cmderr	[automation_generate.sh] [ERROR]     at fulfilled (/opt/hostedtoolcache/node/16.19.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/node_modules/tslib/tslib.js:112:62)"
      warn	No file changes detected after generation
      the given reference name 'refs/heads/sdkAuto/' is not valid
      Error: the given reference name 'refs/heads/sdkAuto/' is not valid
    • error	Fatal error: the given reference name 'refs/heads/sdkAuto/' is not valid
      error	The following packages are still pending:
      error
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 22, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Swagger v3.0 https://apiview.dev/Assemblies/Review/b33e93f9b7424fdd92e26b38a804a8df
    TypeSpec Azure.AI.TextTranslation https://apiview.dev/Assemblies/Review/3557593854b14f1ba6339a05b2bc0e8d

    @openapi-workflow-bot
    Copy link

    Hi @MikeyMCZ, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @openapi-workflow-bot
    Copy link

    Hi, @MikeyMCZ, For review efficiency consideration, when creating a new api version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Or you could onboard API spec pipeline

    Copy link
    Member

    @lmazuel lmazuel left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    CI failure feels unrelated

    @lmazuel lmazuel merged commit 9f3ae9d into Azure:main Apr 3, 2023
    JoshLove-msft pushed a commit to JoshLove-msft/azure-rest-api-specs that referenced this pull request Apr 25, 2023
    * Adding translator API definition (#1)
    
    * Adding translator API definition
    
    * Fixing PR comments, part 1
    
    * Fixes and python
    
    * Add versions
    
    * fix PR comments
    
    * fix operation definition
    
    * Enable all operations and dotnet
    
    * Fixes for languages API
    
    * Double clients and new auth method
    
    * PR comment fix
    
    * Switch to custom operations
    
    * Removing the APIM client
    
    * Adding emitters
    
    * Update api-version
    
    * Updates to models
    
    * Attempt to fix the api-version
    
    * Fixing API version
    
    * Fix dictionaries.
    
    * Fix the models
    
    * Models fixes
    
    * Removing detect, fix breaksentence
    
    * Adding examples
    
    * Fixing languages endpoint
    
    * Updating generation
    
    ---------
    
    Co-authored-by: Michal Materna <[email protected]>
    Co-authored-by: Catalina Peralta <[email protected]>
    
    * Fix the packages names
    
    * Update model names
    
    * Move files
    
    * Switch to knowValues
    
    * Reuse transliteration text models
    
    * Migrate to TSP
    
    * Updating TS files to satisfy pipeline
    
    * Adding autorest
    
    * Adding swagger file
    
    * Adding examples
    
    * Fixing path to examples
    
    * Speel check fix
    
    * Updating name of TS exporter
    
    * Updating openapi.json
    
    * Linting, spell check fixes
    
    * Fix spelling
    
    * Test removing generators
    
    * Fixing BS example
    
    * Fixing model generation
    
    * Update examples
    
    * Prettier
    
    * Generate new openapi.json
    
    * adding azure-resource-provider-folder config
    
    * Suppress warning
    
    * Remove sdk-for-net-track2
    
    * Changing the name of the folder as per PR comment
    
    ---------
    
    Co-authored-by: Michal Materna <[email protected]>
    Co-authored-by: Catalina Peralta <[email protected]>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants