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

[Storage] Fix swagger bug to support oauth on rename (file-share) #22420

Merged

Conversation

vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Feb 2, 2023

Data Plane API - Pull Request

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.

  • Design Document:
  • Previous Open API Doc:
  • Updated paths:

❔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

@openapi-workflow-bot
Copy link

Hi, @vincenttran-msft 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 2, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️❌Breaking Change(Cross-Version): 80 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    file.json 2022-11-02(043006c) 2021-12-02(main)

    The following breaking changes are detected by comparison with the latest preview version:

    Only 30 items are listed, please refer to log for more details.

    Rule Message
    1009 - RemovedRequiredParameter The required parameter 'shareName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1946:9
    1009 - RemovedRequiredParameter The required parameter 'restype' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2228:9
    1009 - RemovedRequiredParameter The required parameter 'shareName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2247:9
    1009 - RemovedRequiredParameter The required parameter 'directory' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2247:9
    1009 - RemovedRequiredParameter The required parameter 'shareName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2487:9
    1009 - RemovedRequiredParameter The required parameter 'directory' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2487:9
    1009 - RemovedRequiredParameter The required parameter 'fileName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L2945:9
    1009 - RemovedRequiredParameter The required parameter 'comp' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L4195:9
    1009 - RemovedRequiredParameter The required parameter 'comp' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L4419:9
    1009 - RemovedRequiredParameter The required parameter 'shareName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L4570:9
    1009 - RemovedRequiredParameter The required parameter 'fileName' was removed in the new version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L4837:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L46:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L93:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L164:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L240:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L313:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L491:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L566:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L689:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L804:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L927:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1047:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1175:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1271:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1331:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1413:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1510:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1601:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1665:9
    1019 - RemovedEnumValue The new version is removing enum value(s) '2021-12-02' from the old version.
    Old: Microsoft.FileStorage/preview/2021-12-02/file.json#L1756:9
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    package-2022-11 package-2022-11(043006c) package-2022-11(feature/storage/stg87base)

    The following errors/warnings exist before current PR submission:

    Only 30 items are listed, please refer to log for more details.

    Rule Message
    HostParametersValidation The host parameter must be called 'endpoint'.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L16
    HostParametersValidation The host parameter must be typed 'type 'string', format 'url''.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L16
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L135
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L145
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L221
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L361
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L366
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L371
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L376
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L387
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L547
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L644
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L670
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L759
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L785
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L882
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L908
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1002
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1028
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1080
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1130
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1156
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1239
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1249
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1390
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1400
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1487
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1497
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1578
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Microsoft.FileStorage/preview/2022-11-02/file.json#L1588
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️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 Feb 2, 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

    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

    @ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Feb 2, 2023
    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane labels Feb 2, 2023
    @openapi-workflow-bot
    Copy link

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

    @vincenttran-msft vincenttran-msft changed the title Add file request intent to comp=rename for dir&files [Storage] Fix swagger bug to support oauth on rename (file-share) Feb 2, 2023
    @vincenttran-msft vincenttran-msft marked this pull request as ready for review February 2, 2023 01:17
    @vincenttran-msft vincenttran-msft requested review from seanmcc-msft and a team as code owners February 2, 2023 01:17
    @vincenttran-msft vincenttran-msft requested review from markweitzel and johanste and removed request for a team February 2, 2023 01:17
    @seanmcc-msft
    Copy link
    Member

    Let me give this a try in the .NET SDK before we merge this.

    Copy link
    Member

    @seanmcc-msft seanmcc-msft left a comment

    Choose a reason for hiding this comment

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

    Approved, OAuth is also working for me in .NET for File Rename and Directory Rename

    @vincenttran-msft vincenttran-msft merged commit 61b7e4a into feature/storage/stg87base Feb 2, 2023
    @vincenttran-msft vincenttran-msft deleted the vincenttran/fix_oauth_swagger branch February 2, 2023 02:32
    tg-msft pushed a commit that referenced this pull request Feb 9, 2023
    * Added new file version (#21704)
    
    * Added HNS Encryption Context (#21693)
    
    * Added x-ms-file-request-intent to File and Directory operations (#21705)
    
    * Trailing Dot (#21781)
    
    * Add file request intent to comp=rename for dir&files (#22420)
    
    ---------
    
    Co-authored-by: vincenttran-msft <[email protected]>
    aviyerMSFT pushed a commit to aviyerMSFT/azure-rest-api-specs that referenced this pull request Mar 22, 2023
    * Added new file version (Azure#21704)
    
    * Added HNS Encryption Context (Azure#21693)
    
    * Added x-ms-file-request-intent to File and Directory operations (Azure#21705)
    
    * Trailing Dot (Azure#21781)
    
    * Add file request intent to comp=rename for dir&files (Azure#22420)
    
    ---------
    
    Co-authored-by: vincenttran-msft <[email protected]>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane Storage Storage Service (Queues, Blobs, Files)
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants