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 ACS Email swagger based on prior feedback from review board in preparation for GA #21841

Merged
merged 32 commits into from
Feb 27, 2023

Conversation

apattath
Copy link
Contributor

@apattath apattath commented Dec 10, 2022

Data Plane API - Pull Request

Update ACS Email swagger based on prior feedback from review board in preparation for GA. We would like to release these changes in preview before we go to GA first.

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your engagement record.

  • Link to engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous Open API document (swagger) if applicable, and the root paths that have been updated.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

fix #22190

@apattath apattath requested a review from a team as a code owner December 10, 2022 02:17
@apattath apattath requested review from markweitzel and weidongxu-microsoft and removed request for a team December 10, 2022 02:17
@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 Dec 10, 2022

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️❌Breaking Change(Cross-Version): 1 Errors, 0 Warnings failed [Detail] The following breaking changes are detected by comparison with the latest preview version:
    Rule Message
    Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/2beb92d3d6c70d683183192bab3beac8bef09322/specification/communication/data-plane/Email/preview/2023-01-15-preview/CommunicationServicesEmail.json",
    "old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/communication/data-plane/Email/preview/2021-10-01-preview/CommunicationServicesEmail.json",
    "details":"Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.47/common/temp/node_modules/.pnpm/@Azure[email protected]/node_modules/autorest/dist/app.js" --v2 --input-file=specification/communication/data-plane/Email/preview/2023-01-15-preview/CommunicationServicesEmail.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=new --output-folder=/tmp\nERROR: Schema violation: Data does not match any schemas from 'oneOf'\n - file:///mnt/vss/_work/1/azure-rest-api-specs/specification/communication/data-plane/Email/preview/2023-01-15-preview/CommunicationServicesEmail.json:152:10 ($.paths["/emails:send"].post["x-ms-examples"]["Send Email"])\nERROR: Schema violation: Data does not match any schemas from 'oneOf'\n - file:///mnt/vss/_work/1/azure-rest-api-specs/specification/communication/data-plane/Email/preview/2023-01-15-preview/CommunicationServicesEmail.json:62:10 ($.paths["/emails/operations/operationId"].get["x-ms-examples"]["G"
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 6 Warnings warning [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    package-2023-01-15-preview package-2023-01-15-preview(2beb92d) default(main)

    [must fix]The following errors/warnings are introduced by current PR:

    Rule Message Related RPC [For API reviewers]
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L20
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L40
    ⚠️ ErrorResponse Error schema should define code and message properties as required.
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L40
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L125
    ⚠️ ErrorResponse Error schema should define code and message properties as required.
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L125
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L237
    ️️✔️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]
    ️️✔️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.
    ️️✔️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 Dec 10, 2022

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

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Dec 10, 2022

    Generated ApiView

    Language Package Name ApiView Link
    swagger communication-data-plane-Email https://apiview.dev/Assemblies/Review/ee454eada3414e52b4fe4ab499d17e89

    @openapi-workflow-bot
    Copy link

    Hi @apattath, 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.

    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required CI-MissingBaseCommit new-api-version labels Dec 12, 2022
    @openapi-workflow-bot
    Copy link

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

    @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.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    @mikekistler
    Copy link
    Member

    The Breaking Changes PR check is failing because of a bug in openapi-diff, so I will add the Approved-BreakingChange label.

    @mikekistler mikekistler added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Feb 8, 2023
    Copy link
    Member

    @mikekistler mikekistler left a comment

    Choose a reason for hiding this comment

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

    Looks good! 👍

    @ruowan
    Copy link
    Member

    ruowan commented Feb 10, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @apattath
    Copy link
    Contributor Author

    @mikekistler - could you help merge this PR please?

    @mikekistler
    Copy link
    Member

    @DominikMe @weidongxu-microsoft are you satisfied with the resolution to your comments? Is this good to merge? If so could you please put your approval on the PR?

    @weidongxu-microsoft
    Copy link
    Member

    weidongxu-microsoft commented Feb 27, 2023

    @mikekistler

    I took another look and approved.

    Added 2 comments.
    One "nit" that might affect codegen/SDK but won't block REST API.
    Another about whether we had result in action status monitor response. <-- ignore it if this is already discussed prior

    @mikekistler mikekistler added the APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. label Feb 27, 2023
    @mikekistler
    Copy link
    Member

    @jhendrixMSFT I think this is ready to merge.

    @jhendrixMSFT jhendrixMSFT merged commit ac7f9d6 into Azure:main Feb 27, 2023
    aviyerMSFT pushed a commit to aviyerMSFT/azure-rest-api-specs that referenced this pull request Mar 22, 2023
    … preparation for GA (Azure#21841)
    
    * rename EmailMessage to Message and Sender to SenderEmail
    
    * Change EmailCustomHeaders to a dictionary of string, string
    
    * add x-ms-client-request-id header
    
    * update swagger version
    
    * Remove AttachmentType enum, change to use MIME type and update SendEmail sample
    
    * Add new version folder for updated swagger version
    
    * Restore files from 2021-10-01-preview version
    
    * Updating references and readme to point to the new preview version
    
    * Fix API version to 2023-01-15-preview instead of 2023-15-01-preview
    
    * Rename preview version folder
    
    * Revert name of Message object to EmailMessage, but retain name to be generated as message
    
    * remove retry-after header, update attachment description, change cc,bcc to lowercase
    
    * update samples based on changes so far
    
    * add x-ms-long-running-operation flag
    
    * Remove importance field from email message
    
    * update swagger to match LongRunningOperation pattern
    
    * update swagger version of CommunicationErrorResponse
    
    * Remove SendStatusResult object
    
    * rename title to EmailClient
    
    * Add more status retrieval samples
    
    * fix validation errors in swagger
    
    * update swagger based on REST API review feedback
    
    * Update casing for opreation status in all samples
    
    * update swagger based on ARB SDK Feedback
    
    * update get operation status reference schema
    
    * update property ContentBytesBase64 to ContentInBase64
    
    * rename disableUserEngagementTracking property
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    ACS APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 CI-MissingBaseCommit data-plane new-api-version
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [Communication - Email] API Review
    7 participants