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

Update CommunicationTurn swagger and add CommunicationIdentity swagger to preview folder #12881

Merged
merged 6 commits into from
Feb 11, 2021

Conversation

apattath
Copy link
Contributor

@apattath apattath commented Feb 6, 2021

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

Following changes are made in this PR:
Updates to CommunicationTurn swagger (Note, this Turn swagger is not yet released to public):

  1. To use shared types for CommunicationErrorResponse from stable common.json
  2. To rename Turn types by adding prefix Communication to be consistent with other models in the Communication.Identity package

Update to CommunicationIdentity swagger:
This change is needed since CommunicationIdentity and CommunicationTurn both go into the same SDK package and need to align on version (otherwise the generated SDK hardcodes the newer version).

  1. Create a copy of current stable CommunicationIdentity.json (and examples) under a sub-folder under data-plane\Microsoft.CommunicationServicesIdentity\preview\2021-02-22-preview1\CommunicationIdentity.json.
  2. Update the version of CommunicationIdentity swagger under this folder to 2021-02-22-preview1 to match with CommunicationTurn version (as both are going into the same SDK package)

Update to Readme.md

  1. Add new version of CommunicationIdentity.json to the input file flag.

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? By next week
  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 Breaking Change 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 or public preview version with Breaking Change Validation errors
  • Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

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.

@openapi-workflow-bot
Copy link

Hi, @apattath 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 Feb 6, 2021

    Swagger Validation Report

    ️❌BreakingChange: 1 Errors, 0 Warnings failed [Detail]

    Rule Message
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'innerError' renamed or removed?
    New: Microsoft.CommunicationServicesCommon/stable/2021-03-07/common.json#L30:7
    Old: Microsoft.CommunicationServicesTurn/preview/2021-02-22-preview1/CommunicationTurn.json#L61:7
    ️⚠️LintDiff: 6 Warnings warning [Detail]

    Rule Message
    ⚠️ R2063 - OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'CommunicationIdentityModel'. Consider using the plural form of 'CommunicationIdentity' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L15
    ⚠️ R2063 - OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'CommunicationIdentityModel'. Consider using the plural form of 'CommunicationIdentity' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L61
    ⚠️ R2063 - OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'CommunicationIdentityModel'. Consider using the plural form of 'CommunicationIdentity' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L101
    ⚠️ R2063 - OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'CommunicationIdentityModel'. Consider using the plural form of 'CommunicationIdentity' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L141
    ⚠️ R2063 - OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'CommunicationIdentityModel'. Consider using the plural form of 'CommunicationIdentity' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.CommunicationServicesTurn/preview/2021-02-22-preview1/CommunicationTurn.json#L15
    ⚠️ R4000 - ParameterDescriptionRequired 'body' parameter lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation.
    Location: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L26
    ️️✔️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): 7 Warnings warning [Detail]

    Rule Message
    ⚠️ 1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/identities/{id}/token' removed or restructured?
    Old: Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json#L123:5
    ⚠️ 1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'CommunicationIdentityUpdateRequest' removed or renamed?
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L191:3
    Old: Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json#L176:3
    ⚠️ 1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'CommunicationTokenRequest' removed or renamed?
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L191:3
    Old: Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json#L176:3
    ⚠️ 1011 - AddingResponseCode The new version adds a response code '201'.
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L41:11
    ⚠️ 1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L35:11
    ⚠️ 1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L78:11
    ⚠️ 1035 - RemovedOperation The new version is missing an operation that was found in the old version. Was operationId 'CommunicationIdentity_Update' removed or restructured?
    New: Microsoft.CommunicationServicesIdentity/preview/2021-02-22-preview1/CommunicationIdentity.json#L55:5
    Old: Microsoft.CommunicationServicesIdentity/preview/2020-07-20-preview2/CommunicationIdentity.json#L45:5
    ️️✔️[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
    There are no breaking changes.

    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️[Staging] SDK Track2 Validation: 1 Warnings warning [Detail]

    Rule Message
    ⚠️ PreCheck/CheckDuplicateSchemas "readme":"communication/data-plane/readme.md",
    "tag":"package-2021-02-22-preview1",
    "details":"Checking for duplicate schemas,
    this could take a (long) while. Run with --verbose for more detail."
    ️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Feb 6, 2021

    Swagger pipeline restarted successfully, please wait for status update in this comment.

    @openapi-workflow-bot
    Copy link

    Hi @apattath, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    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.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

    @apattath
    Copy link
    Contributor Author

    apattath commented Feb 6, 2021

    @RezaJooyandeh @DominikMe @ajpeacock0 @alexandra142 - tagging all of you for review as well.

    @apattath
    Copy link
    Contributor Author

    apattath commented Feb 6, 2021

    I believe the breaking change is from the change made by @DominikMe in his earlier PR (#12799) to use the common type for CommunicationErrorResponse. According to that PR, it really isn't a breaking change due to following reasons:

    Justification:

    None of the SDK is released.
    The breaking change is about renaming a property from "innerError" to "innererror" (the new name follows the API guideline ref).
    The service has not yet been picked by customers, and the innerError property is not populated at the moment.

    Copy link
    Member

    @tjprescott tjprescott left a comment

    Choose a reason for hiding this comment

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

    @johanste could you provide the approval?

    Justification:

    None of the SDK is released.
    The breaking change is about renaming a property from "innerError" to "innererror" (the new name follows the API guideline ref).
    The service has not yet been picked by customers, and the innerError property is not populated at the moment.

    Same rationale as in #12799.

    @johanste johanste added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Feb 11, 2021
    @tjprescott tjprescott merged commit e6a4cb6 into Azure:master Feb 11, 2021
    mkarmark pushed a commit to mkarmark/azure-rest-api-specs that referenced this pull request Jul 21, 2021
    …r to preview folder (Azure#12881)
    
    * update Identity and Turn swaggers to use common definition of CommunicationErrorResponse type
    
    * Update Turn swagger to use definitions from CommunicationIdentity swagger
    
    * update CommunicationIdentity to preview version to match with CommunicationTurn swagger
    
    * update readme file with preview version of CommnicationIdentity.json
    
    * add examples for CommunicationIdentity
    
    Co-authored-by: Avin Pattath <[email protected]>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants