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

Microsoft.DigitalTwins - add stable data-plane API version 2022-05-31 #18790

Conversation

sjiherzig
Copy link
Member

@sjiherzig sjiherzig commented Apr 22, 2022

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

Changelog

Add a changelog entry for 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 are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the 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 refresh required 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

Applicability: ⚠️

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

  • Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version
      -[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
  • 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 any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in a stable version
  • Removing properties in a stable version
  • Removing API version(s) in a stable version
  • Updating API in a 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, @sjiherzig 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-workflow-bot
    Copy link

    [Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks.

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 22, 2022

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    The following errors/warnings exist before current PR submission:
    Rule Message
    ⚠️ R2064 - LROStatusCodesReturnTypeSchema 200/201 Responses of long running operations must have a schema definition for return type. OperationId: 'DigitalTwins_Add', Response code: '200'
    Location: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L404
    ⚠️ R2064 - LROStatusCodesReturnTypeSchema 200/201 Responses of long running operations must have a schema definition for return type. OperationId: 'DigitalTwins_AddRelationship', Response code: '200'
    Location: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L607
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️❌ModelValidation: 7 Errors, 0 Warnings failed [Detail]
    Rule Message
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L348:22
    ExampleUrl: stable/2022-05-31/examples/GetTwin.json#L6:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L403:22
    ExampleUrl: stable/2022-05-31/examples/PutTwinBasicExample.json#L11:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L403:22
    ExampleUrl: stable/2022-05-31/examples/PutTwinAdvancedExample.json#L28:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L548:22
    ExampleUrl: stable/2022-05-31/examples/GetRelationshipById.json#L7:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L606:22
    ExampleUrl: stable/2022-05-31/examples/CreateRelationshipBasicExample.json#L11:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L606:22
    ExampleUrl: stable/2022-05-31/examples/CreateRelationshipAdvancedExample.json#L13:16
    INVALID_TYPE Expected type but found type object
    Url: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L992:22
    ExampleUrl: stable/2022-05-31/examples/GetComponent.json#L7:16
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️❌Cross-Version Breaking Changes: 37 Errors, 87 Warnings failed [Detail]
    The following breaking changes are detected by comparison with the latest stable version:

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

    Rule Message
    1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L40:11
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L40:11
    1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1183:11
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1192:11
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L67:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L67:13
    1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L115:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L115:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L121:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L121:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L171:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L171:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L217:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L217:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L248:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L248:13
    1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L301:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L301:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L313:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L313:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L363:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L363:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L418:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L421:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L452:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L455:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L510:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L516:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L563:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L569:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L621:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L627:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L658:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L664:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L719:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L725:13
    1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L770:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L776:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L776:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L782:13
    1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L817:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L823:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L823:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L829:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L887:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L893:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L954:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L960:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1007:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1013:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1068:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1077:13
    1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1106:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1115:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1112:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1121:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1159:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1168:13
    1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1202:13
    Old: Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json#L1210:13


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

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

    Rule Message
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L39:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L39:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L90:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L90:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L151:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L151:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L191:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L191:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L234:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L234:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L281:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L281:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L340:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L340:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L383:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L383:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L435:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L438:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L475:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L478:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L537:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L543:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L583:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L589:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L638:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L644:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L681:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L687:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L752:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L758:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L806:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L812:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L850:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L856:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L914:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L920:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L981:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L987:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1030:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1036:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1095:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1104:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1142:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1151:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1179:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1188:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1219:9
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1227:9
    ⚠️ 1016 - ConstantStatusHasChanged The 'constant' status changed from the old version to the new.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1559:5
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1549:5
    ⚠️ 1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L40:11
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L40:11
    ⚠️ 1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L1183:11
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L1192:11
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L67:13
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L67:13
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'value' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L115:13
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L115:13
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'error' that was not found in the old version.
    New: Microsoft.DigitalTwins/stable/2022-05-31/digitaltwins.json#L121:13
    Old: Microsoft.DigitalTwins/preview/2021-06-30-preview/digitaltwins.json#L121:13
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️SDK Track2 Validation succeeded [Detail] [Expand]
    Validation passes for SDKTrack2Validation

    ️️✔️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).
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 22, 2022

    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

    ️✔️azure-sdk-for-go - digitaltwins/2022-05-31/digitaltwins - v64.1.0
    ️✔️azure-sdk-for-go - digitaltwins/2020-10-31/digitaltwins - v64.1.0
    ️✔️azure-sdk-for-go - preview/digitaltwins/2021-06-30-preview/digitaltwins - v64.1.0
    ️✔️azure-sdk-for-go - preview/digitaltwins/2020-05-31-preview/digitaltwins - v64.1.0
    ️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
    Posted by Swagger Pipeline | How to fix these errors?

    @sjiherzig sjiherzig added Digital Twins DoNotMerge <valid label in PR review process> use to hold merge after approval labels Apr 22, 2022
    @openapi-workflow-bot
    Copy link

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

    @sjiherzig
    Copy link
    Member Author

    To help drive the review, here is a summary of the changes from the previous version (2021-06-30-preview):

    • Updated API version header
    • Removed enumeration literals from api-version parameter, and converted to string per past guidance
    • Added "sourceTime" usage to examples

    @sjiherzig sjiherzig marked this pull request as ready for review April 23, 2022 00:20
    @sjiherzig sjiherzig requested a review from a team as a code owner April 23, 2022 00:20
    @sjiherzig sjiherzig requested review from JeffreyRichter and weidongxu-microsoft and removed request for a team April 23, 2022 00:20
    @sjiherzig
    Copy link
    Member Author

    Note: I don't know what to do about the ModelValidation failure. We have used an "object" return type in the past, since the API response greatly depends on a model defined by the customer.

    @weidongxu-microsoft
    Copy link
    Member

    @jianyexi for ModelValidation failure. At least the error message does not make sense for INVALID_TYPE. Expected type {0} but found type {1}. but it does not say anything for expected type.

    @sjiherzig sjiherzig linked an issue Apr 27, 2022 that may be closed by this pull request
    @weidongxu-microsoft
    Copy link
    Member

    "required" in schema should be done like this:

    @sjiherzig
    Copy link
    Member Author

    "required" in schema should be done like this:

    This has now been addressed.

    @sjiherzig
    Copy link
    Member Author

    One thing to note - I've removed the "readyOnly" attribute from the error response model parameters because one of the automated validation tools complained that a required property should not be readyonly. This doesn't quite make sense to me - doesn't readonly set only the context whether it is from a response or a request? Should / can this be fixed?

    @weidongxu-microsoft
    Copy link
    Member

    weidongxu-microsoft commented May 16, 2022

    @sjiherzig
    My fault. OpenAPI 2.0 does not allow specifying both "readonly" and "required" to property. (see https://swagger.io/specification/v2/ on "readonly")

    Our guide https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors and some SDK weight more on "required", as in this particular case, "readonly" of the whole "Error" schema can be deduced (as "Error" is not used as input in any operation).

    In this case, maybe not adding the "required" is the preferred compromise, as it keep it same as your last GA api-version.
    But do keep it on "ErrorResponse".

    @weidongxu-microsoft
    Copy link
    Member

    @sjiherzig

    Please also note that the guideline asks for the "x-ms-error-code" header on error response.
    https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

    Please do evaluate whether it can be included in this api-version (it requires backend change). If yes, please support it; if not, please open a backlog item in your service to add it in next api-version.

    Copy link
    Member

    @weidongxu-microsoft weidongxu-microsoft left a comment

    Choose a reason for hiding this comment

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

    LGTM

    skip ModelValidation CI, as it is intended for digitaltwin having response schema of type=object

    @weidongxu-microsoft weidongxu-microsoft added APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. and removed APIStewardshipBoard-ReviewRequested This should be reviewed by the Azure API Stewardship team in partnership with the service team. labels May 23, 2022
    @sjiherzig sjiherzig removed the DoNotMerge <valid label in PR review process> use to hold merge after approval label Jun 27, 2022
    @sjiherzig
    Copy link
    Member Author

    Hi @weidongxu-microsoft - this is now ready to be merged!

    @weidongxu-microsoft
    Copy link
    Member

    @sjiherzig

    Do we have an issue relates to the PR?

    I didn't remember since it is a long time ago. It is possible you do not have the issue and meeting notes, as there is no API change since last version.

    @sjiherzig
    Copy link
    Member Author

    @weidongxu-microsoft Yes, there is a GitHub issue for this PR: #18792 .

    There are no outstanding action items for the PR. The review was done asynchronously.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    API Review Scoping This is an issue that will track work on a specific set of API changes. APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. Approved-ModelValidation CI-FixRequiredOnFailure Digital Twins
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [DigitalTwins] REST API Review
    6 participants