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

Face PersonDirectory argument type mismatch fix #21572

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

msyache
Copy link
Contributor

@msyache msyache commented Nov 16, 2022

Data Plane API - Pull Request

Update the Person related operations in PersonDirectory to consume personId as GUID as opposed to string.
The change adheres to the existing pattern for Person Group and Large Person Group, clarifies intended usage, and should reduce confusion from the current discrepancy between returned GUIDs in responses while the corresponding operation arguments are string.

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

Update the Person related operations in PersonDirectory to consume
personId as GUID as opposed to string.
The change adheres to the existing pattern for Person Group and
Large Person Group, clarifies intended usage, and should reduce
confusion from the current discrepancy between returned GUIDs in
responses while the corresponding operation arguments are string.
@openapi-workflow-bot
Copy link

Hi, @msyache 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. vscswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Nov 16, 2022

    Swagger Validation Report

    ️❌BreakingChange: 21 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.2)] new version base version
    Face.json v1.0-preview(c58cb72) v1.0-preview(main)
    Rule Message
    1008 - ModifiedOperationId The operation id has been changed from 'PersonDirectory_AddPersonFace' to 'PersonDirectory_AddPersonFaceFromUrl'. This will impact generated code.
    New: Face/preview/v1.0-preview/Face.json#L2755:7
    Old: Face/preview/v1.0-preview/Face.json#L2751:7
    1010 - AddingRequiredParameter The required parameter 'ImageUrl' was added in the new version.
    New: Face/preview/v1.0-preview/Face.json#L2764:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Face/preview/v1.0-preview/Face.json#L2594:13
    Old: Face/preview/v1.0-preview/Face.json#L2593:13
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2542:11
    Old: Face/preview/v1.0-preview/Face.json#L2542:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2640:11
    Old: Face/preview/v1.0-preview/Face.json#L2639:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2683:11
    Old: Face/preview/v1.0-preview/Face.json#L2681:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2724:11
    Old: Face/preview/v1.0-preview/Face.json#L2721:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2765:11
    Old: Face/preview/v1.0-preview/Face.json#L2761:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2838:11
    Old: Face/preview/v1.0-preview/Face.json#L2830:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2886:11
    Old: Face/preview/v1.0-preview/Face.json#L2877:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2901:11
    Old: Face/preview/v1.0-preview/Face.json#L2891:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2943:11
    Old: Face/preview/v1.0-preview/Face.json#L2932:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L2958:11
    Old: Face/preview/v1.0-preview/Face.json#L2946:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L3000:11
    Old: Face/preview/v1.0-preview/Face.json#L2987:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L3015:11
    Old: Face/preview/v1.0-preview/Face.json#L3001:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L5368:11
    Old: Face/preview/v1.0-preview/Face.json#L5344:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L5393:11
    Old: Face/preview/v1.0-preview/Face.json#L5367:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L3259:11
    Old: Face/preview/v1.0-preview/Face.json#L3244:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L3353:11
    Old: Face/preview/v1.0-preview/Face.json#L3337:11
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Face/preview/v1.0-preview/Face.json#L3709:11
    Old: Face/preview/v1.0-preview/Face.json#L3692:11
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'personId' renamed or removed?
    New: Face/preview/v1.0-preview/Face.json#L5278:7
    Old: Face/preview/v1.0-preview/Face.json#L5233:7
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 10 Warnings warning [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    release_1_0_preview release_1_0_preview(c58cb72) release_1_0_preview(main)

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

    Rule Message Related RPC [For API reviewers]
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5240
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5256
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5272
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5293
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5309
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5316
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5371
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5396
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5423
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: Face/preview/v1.0-preview/Face.json#L5434


    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: Face/preview/v1.0-preview/Face.json#L24
    HostParametersValidation The host parameter must be typed 'type 'string', format 'url''.
    Location: Face/preview/v1.0-preview/Face.json#L24
    OperationIdNounVerb Per the Noun_Verb convention for Operation Ids, the noun 'Face' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Face/preview/v1.0-preview/Face.json#L162
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L261
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L718
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L1213
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L1670
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L1983
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L2219
    OperationIdNounVerb Per the Noun_Verb convention for Operation Ids, the noun 'Face' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Face/preview/v1.0-preview/Face.json#L3400
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L4394
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L4539
    XmsEnumValidation The enum types should have x-ms-enum type extension set with appropriate options.
    Location: Face/preview/v1.0-preview/Face.json#L5327
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: Face/preview/v1.0-preview/Face.json#L5677
    ⚠️ VersionConvention API version should be a date in YYYY-MM-DD format, optionally suffixed with '-preview'.
    Location: Face/preview/v1.0-preview/Face.json#L4
    ⚠️ SecurityDefinitionDescription Security definition should have a description.
    Location: Face/preview/v1.0-preview/Face.json#L9
    ⚠️ VersionPolicy Operation does not define an 'api-version' query parameter.
    Location: Face/preview/v1.0-preview/Face.json#L34
    ⚠️ SchemaTypeAndFormat Schema with type: integer should specify format
    Location: Face/preview/v1.0-preview/Face.json#L41
    ⚠️ ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Face/preview/v1.0-preview/Face.json#L59
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Face/preview/v1.0-preview/Face.json#L61
    ⚠️ ErrorResponse Error schema should define code and message properties as required.
    Location: Face/preview/v1.0-preview/Face.json#L61
    ⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
    Location: Face/preview/v1.0-preview/Face.json#L74
    ⚠️ VersionPolicy Operation does not define an 'api-version' query parameter.
    Location: Face/preview/v1.0-preview/Face.json#L77
    ⚠️ ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Face/preview/v1.0-preview/Face.json#L102
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Face/preview/v1.0-preview/Face.json#L104
    ⚠️ ErrorResponse Error schema should define code and message properties as required.
    Location: Face/preview/v1.0-preview/Face.json#L104
    ⚠️ VersionPolicy Operation does not define an 'api-version' query parameter.
    Location: Face/preview/v1.0-preview/Face.json#L120
    ⚠️ SchemaTypeAndFormat Schema with type: number should specify format
    Location: Face/preview/v1.0-preview/Face.json#L127
    ⚠️ SchemaTypeAndFormat Schema with type: integer should specify format
    Location: Face/preview/v1.0-preview/Face.json#L127
    ⚠️ ErrorResponse Error response should contain a x-ms-error-code header.
    Location: Face/preview/v1.0-preview/Face.json#L145
    ️️✔️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.

    ️️✔️~[Staging] SwaggerAPIView 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 Nov 16, 2022

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

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Nov 16, 2022

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

    @ghost ghost added the Cognitive Services label Nov 16, 2022
    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane labels Nov 16, 2022
    @openapi-workflow-bot
    Copy link

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

    @msyache
    Copy link
    Contributor Author

    msyache commented Nov 18, 2022

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Nov 21, 2022
    @@ -5218,7 +5236,8 @@
    "properties": {
    "personId": {
    "format": "uuid",
    "type": "string"
    "type": "string",
    "x-nullable": false
    Copy link
    Member

    @jhendrixMSFT jhendrixMSFT Nov 29, 2022

    Choose a reason for hiding this comment

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

    Since x-nullable:false is the default, can you please remove it.

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    I had to explicitly add it in order for AutoRest to generate a property without nullable--we needed type Guid instead of Guid? there.

    Copy link
    Member

    Choose a reason for hiding this comment

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

    I see. No need to block on this then but that seems weird.

    @mikekistler do you know if this is a bug in the C# codegen?

    @jhendrixMSFT jhendrixMSFT merged commit 66dc2c9 into Azure:main Nov 30, 2022
    anandanthony pushed a commit to anandMicro/azure-rest-api-specs that referenced this pull request Dec 16, 2022
    * Fix Face PersonDirectory argument type mismatch
    
    Update the Person related operations in PersonDirectory to consume
    personId as GUID as opposed to string.
    The change adheres to the existing pattern for Person Group and
    Large Person Group, clarifies intended usage, and should reduce
    confusion from the current discrepancy between returned GUIDs in
    responses while the corresponding operation arguments are string.
    
    * Fix person request type
    
    * Fix AddPersonFace missing url in json
    kayousef-zz pushed a commit to kayousef-zz/azure-rest-api-specs that referenced this pull request Dec 21, 2022
    * Fix Face PersonDirectory argument type mismatch
    
    Update the Person related operations in PersonDirectory to consume
    personId as GUID as opposed to string.
    The change adheres to the existing pattern for Person Group and
    Large Person Group, clarifies intended usage, and should reduce
    confusion from the current discrepancy between returned GUIDs in
    responses while the corresponding operation arguments are string.
    
    * Fix person request type
    
    * Fix AddPersonFace missing url in json
    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 BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required Cognitive Services data-plane
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants