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

TA v3.1-preview.4 - updated examples and definitions for TA for Health #12340

Merged
merged 13 commits into from
Jan 20, 2021
Merged

TA v3.1-preview.4 - updated examples and definitions for TA for Health #12340

merged 13 commits into from
Jan 20, 2021

Conversation

ctufts
Copy link
Contributor

@ctufts ctufts commented Jan 8, 2021

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Changelog

Please ensure to add changelog with this PR by answering the following questions.

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
  3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
  4. If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No, no need to refresh for updates in this PR

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Adding a new service
  • Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.

Please follow the link to find more details on PR review process.

@ctufts ctufts requested a review from yangyuan as a code owner January 8, 2021 21:50
@openapi-workflow-bot
Copy link

Hi, @ctufts 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. vsswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 8, 2021

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.

    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
    There are no breaking changes.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 8, 2021

    Swagger Generation Artifacts

    ️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs] Generate from 516a0678ba1e9413c7daff57fe152539e3b619b7. 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
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      cmderr	[generate.py] 2021-01-13 22:43:59 ERROR [Skip] readme path does not format as specification/*/resource-manager/readme.md
      warn	No file changes detected after generation
      warn	No package detected after generation
    ️❌ azure-sdk-for-python failed [Detail]
    • Failed [Logs] Generate from 516a0678ba1e9413c7daff57fe152539e3b619b7. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	npx n 12
      command	python3 -m venv venv
      command	pip install --upgrade setuptools wheel pip
      command	pip install pathlib jinja2 msrestazure
      command	autorest --version=V2 --use=@microsoft.azure/autorest.python@~4.0.71 --python --python-mode=update --multiapi --keep-version-file --no-async --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk ../azure-rest-api-specs/specification/cognitiveservices/data-plane/TextAnalytics/readme.md
    • azure-ai-textanalytics [View full logs]  [Preview SDK Changes]
      cmderr	[buildConf] INFO:packaging_tools:Building template azure-ai-textanalytics
      cmderr	[buildConf] INFO:packaging_tools.conf:Skipping default conf since the file exists
      cmderr	[buildConf] INFO:packaging_tools:Package azure-ai-textanalytics has no auto-packaging update enabled
      cmderr	[buildPackage] Traceback (most recent call last):
      cmderr	[buildPackage]   File "setup.py", line 39, in <module>
      cmderr	[buildPackage]     with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd:
      cmderr	[buildPackage] FileNotFoundError: [Errno 2] No such file or directory: 'azure/ai/textanalytics/_version.py'
      cmderr	[buildPackage] Traceback (most recent call last):
      cmderr	[buildPackage]   File "./build_package.py", line 33, in <module>
      cmderr	[buildPackage]     create_package(args.name, args.dest)
      cmderr	[buildPackage]   File "./build_package.py", line 22, in create_package
      cmderr	[buildPackage]     check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
      cmderr	[buildPackage]   File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
      cmderr	[buildPackage]     raise CalledProcessError(retcode, cmd)
      cmderr	[buildPackage] subprocess.CalledProcessError: Command '['python', 'setup.py', 'bdist_wheel', '-d', 'sdk/textanalytics/azure-ai-textanalytics']' returned non-zero exit status 1.
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-python]: python
      warn	Skip command for failed context: python ./scripts/dev_setup.py -p azure-ai-textanalytics
      warn	Skip command for failed context: python -m packaging_tools.code_report azure-ai-textanalytics
      warn	Skip command for failed context: python -m packaging_tools.code_report azure-ai-textanalytics --last-pypi
      warn	Not exact 2 reports found:
      warn	Not generating changelog.
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from 516a0678ba1e9413c7daff57fe152539e3b619b7. SDK Automation 14.0.0
      command	sh ./initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	go run ./tools/generator/main.go ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️cognitiveservices/v2.1/textanalytics [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️cognitiveservices/v2.0/textanalytics [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from 516a0678ba1e9413c7daff57fe152539e3b619b7. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	autorest --version=V2 --typescript --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.typescript@4.4.4 --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js/azure-sdk-for-js ../../azure-rest-api-specs/specification/cognitiveservices/data-plane/TextAnalytics/readme.md
    • ️✔️@azure/cognitiveservices-textanalytics [View full logs]  [Preview SDK Changes]
      cmderr	[npmPack] loaded rollup.config.js with warnings
      cmderr	[npmPack] (!) Unused external imports
      cmderr	[npmPack] default imported from external module 'rollup' but never used
      cmderr	[npmPack] ./esm/textAnalyticsClient.js → ./dist/cognitiveservices-textanalytics.js...
      cmderr	[npmPack] created ./dist/cognitiveservices-textanalytics.js in 151ms
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-workflow-bot
    Copy link

    Hi @ctufts, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff.

    TaskHow to fixPrioritySupport (Microsoft alias)
    AvocadoFix-AvocadoHighruowan
    Semantic validationFix-SemanticValidation-ErrorHighraychen, jianyxi
    Model validationFix-ModelValidation-ErrorHighraychen,jianyxi
    LintDiffFix-LintDiffhighjianyxi, ruoxuan
    If you need further help, please feedback via swagger feedback."

    @tjprescott
    Copy link
    Member

    @ctufts is this ready to merge?

    @ctufts
    Copy link
    Contributor Author

    ctufts commented Jan 11, 2021

    @ctufts is this ready to merge?
    @tjprescott Not yet, I'd like to get a review in from some other TA members first. Will update you when it is ready for merging.

    Chris Tufts and others added 2 commits January 13, 2021 12:55
    @ctufts
    Copy link
    Contributor Author

    ctufts commented Jan 13, 2021

    @ctufts is this ready to merge?
    @tjprescott Not yet, I'd like to get a review in from some other TA members first. Will update you when it is ready for merging.

    @tjprescott I believe this is ready to merge now.

    Copy link
    Member

    @abhahn abhahn left a comment

    Choose a reason for hiding this comment

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

    One thing that has come up in discussion with the SDK team is about whether or not we could include the different relation types as an enum in the Swagger. I this something that is feasible, or are there reasons we shouldn't do this?

    @assafi
    Copy link
    Contributor

    assafi commented Jan 15, 2021

    One thing that has come up in discussion with the SDK team is about whether or not we could include the different relation types as an enum in the Swagger. I this something that is feasible, or are there reasons we shouldn't do this?

    @abhahn This will tie the set of returned types to a specific API version. So new types for example could only be added in a new API version vs. a new model-version. Although we might be able to use extensible enums via the x-ms-enum extension to mitigate that concern.

    @tjprescott tjprescott merged commit 30bd84d into Azure:dev-cognitiveservices-TextAnalytics-v3.1-preview.4 Jan 20, 2021
    anuchandy added a commit that referenced this pull request Feb 12, 2021
    * Adds base for updating TextAnalytics from version preview/v3.1-preview.3 to version v3.1-preview.4
    
    * Updates readme
    
    * Updates API version in new specs and examples
    
    * add entity linking task (#12366)
    
    * Opinion Mining API changes for Preview.4 (#12344)
    
    * Adding changed example
    
    * json change for om part 1
    
    * Change API structure as well
    
    * refine text again
    
    * Getting back to false by default
    
    * word chagne
    
    * .
    
    * final wording change
    
    * fix for readme.md
    
    Co-authored-by: josuh <josuh@microsoft.com>
    
    * Analyze: made task results optional (#12373)
    
    * Made results array optional since tasks can be in a failed state with no results
    
    * Fixing a syntax issue in the README
    
    * Attempting to address an Autorest error in the README
    
    * Attempting to address an Autorest error in the README
    
    * Added some info about v3.1-preview.4 to the python readme file; attempting to correct syntax issues in readme.md
    
    * Attempting to fix generation for the Python SDK
    
    * Attempting to fix generation for the Python SDK
    
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    
    * add stringtype parameter to entitylinking task (#12467)
    
    * TA v3.1-preview.4 - updated examples and definitions for TA for Health (#12340)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * PII Types for 3.1-Preview.4 (#12392)
    
    * based off of correct branch now
    
    * change the request from enum to a generic list of strings
    
    * cleanup some other comments
    
    * add enum type
    
    * change type --> category
    
    * add categories to the swagger
    
    * update the types to make them read better
    
    * add in the NER types
    
    * add in address type as well
    
    * fix some typos
    
    * one last typo
    
    * Health descritpion and naming updates (#12616)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * TA v3.1-preview.4 - Minor syntax changes to address comments on PR 12338  (#12650)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * addressed comments for minor syntax changes
    
    * replaced all instances of well-known
    
    * fixed linting issue - pii category was set to list instead of string
    
    * [text analytics] Fixed Swagger validation issues for v3.1-preview.4 (#12660)
    
    * Trying to solve swagger validation issues
    
    * Removed x-ms-enum property from PiiCategories
    
    * Created a definition for PiiCategories in addition to a parameter in order to support passing the same thing in the body of a Task object
    
    * Ran 'prettier' to, uh... make it prettier.
    
    * Updated custom-words.txt
    
    * Corrected typos in Swagger and removed unneeded entries in custom-words.txt
    
    * Changed 'default' to 'x-ms-client-default' in order to pass both model validation and linting
    
    * Fixed a misspelled PII category
    
    * Reran prettier check
    
    * Removed an experimental line in the Swagger
    
    * Adding collectionFormat to fix an autorest error
    
    * Removing x-ms-client-default
    
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    
    * Added Extensible Enum for Health Relation Types - Dev cognitiveservices text analytics v3.1 preview.4 (#12737)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * addressed comments for minor syntax changes
    
    * replaced all instances of well-known
    
    * fixed linting issue - pii category was set to list instead of string
    
    * revert change to pii default
    
    * remove default value as this is an optional parameter
    
    * added extensible list to relation types for healthcare
    
    * revert change to pii default
    
    * changed enum type and made extensible via the modelAsString param
    
    * ran npm prettier check and fixed spelling error (#12947)
    
    Co-authored-by: Chris Tufts <christopher.tufts25@gmail.com>
    Co-authored-by: Mikael <mikael.sitruk@outlook.com>
    Co-authored-by: Joohee Suh <58048046+josuhazure@users.noreply.github.com>
    Co-authored-by: josuh <josuh@microsoft.com>
    Co-authored-by: Abigail Hartman <Abigail.Hahn@microsoft.com>
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    Co-authored-by: Thaminda Edirisooriya <61993993+thediris@users.noreply.github.com>
    mkarmark pushed a commit to mkarmark/azure-rest-api-specs that referenced this pull request Jul 21, 2021
    * Adds base for updating TextAnalytics from version preview/v3.1-preview.3 to version v3.1-preview.4
    
    * Updates readme
    
    * Updates API version in new specs and examples
    
    * add entity linking task (Azure#12366)
    
    * Opinion Mining API changes for Preview.4 (Azure#12344)
    
    * Adding changed example
    
    * json change for om part 1
    
    * Change API structure as well
    
    * refine text again
    
    * Getting back to false by default
    
    * word chagne
    
    * .
    
    * final wording change
    
    * fix for readme.md
    
    Co-authored-by: josuh <josuh@microsoft.com>
    
    * Analyze: made task results optional (Azure#12373)
    
    * Made results array optional since tasks can be in a failed state with no results
    
    * Fixing a syntax issue in the README
    
    * Attempting to address an Autorest error in the README
    
    * Attempting to address an Autorest error in the README
    
    * Added some info about v3.1-preview.4 to the python readme file; attempting to correct syntax issues in readme.md
    
    * Attempting to fix generation for the Python SDK
    
    * Attempting to fix generation for the Python SDK
    
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    
    * add stringtype parameter to entitylinking task (Azure#12467)
    
    * TA v3.1-preview.4 - updated examples and definitions for TA for Health (Azure#12340)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * PII Types for 3.1-Preview.4 (Azure#12392)
    
    * based off of correct branch now
    
    * change the request from enum to a generic list of strings
    
    * cleanup some other comments
    
    * add enum type
    
    * change type --> category
    
    * add categories to the swagger
    
    * update the types to make them read better
    
    * add in the NER types
    
    * add in address type as well
    
    * fix some typos
    
    * one last typo
    
    * Health descritpion and naming updates (Azure#12616)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * TA v3.1-preview.4 - Minor syntax changes to address comments on PR 12338  (Azure#12650)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * addressed comments for minor syntax changes
    
    * replaced all instances of well-known
    
    * fixed linting issue - pii category was set to list instead of string
    
    * [text analytics] Fixed Swagger validation issues for v3.1-preview.4 (Azure#12660)
    
    * Trying to solve swagger validation issues
    
    * Removed x-ms-enum property from PiiCategories
    
    * Created a definition for PiiCategories in addition to a parameter in order to support passing the same thing in the body of a Task object
    
    * Ran 'prettier' to, uh... make it prettier.
    
    * Updated custom-words.txt
    
    * Corrected typos in Swagger and removed unneeded entries in custom-words.txt
    
    * Changed 'default' to 'x-ms-client-default' in order to pass both model validation and linting
    
    * Fixed a misspelled PII category
    
    * Reran prettier check
    
    * Removed an experimental line in the Swagger
    
    * Adding collectionFormat to fix an autorest error
    
    * Removing x-ms-client-default
    
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    
    * Added Extensible Enum for Health Relation Types - Dev cognitiveservices text analytics v3.1 preview.4 (Azure#12737)
    
    * updated examples and health definitions for new preview version
    
    * fixed linting issue in readme
    
    * removed old properties in ta.json
    
    * undo changes to sentiment portion of response, update health response
    
    * fixed spelling issues
    
    * fixed more typose
    
    * remove linting issue in readme
    
    * added enums to assertions
    
    * add in ms-enum extension
    
    * ran prettier json linter over files
    
    * made assertion field singular
    
    * addressed comments and updated description
    
    * addressed comments for minor syntax changes
    
    * replaced all instances of well-known
    
    * fixed linting issue - pii category was set to list instead of string
    
    * revert change to pii default
    
    * remove default value as this is an optional parameter
    
    * added extensible list to relation types for healthcare
    
    * revert change to pii default
    
    * changed enum type and made extensible via the modelAsString param
    
    * ran npm prettier check and fixed spelling error (Azure#12947)
    
    Co-authored-by: Chris Tufts <christopher.tufts25@gmail.com>
    Co-authored-by: Mikael <mikael.sitruk@outlook.com>
    Co-authored-by: Joohee Suh <58048046+josuhazure@users.noreply.github.com>
    Co-authored-by: josuh <josuh@microsoft.com>
    Co-authored-by: Abigail Hartman <Abigail.Hahn@microsoft.com>
    Co-authored-by: Abigail Hartman <Abigail.Hartman@microsoft.com>
    Co-authored-by: Thaminda Edirisooriya <61993993+thediris@users.noreply.github.com>
    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.

    4 participants