azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

DO NOT REVIEW experimental typespec refactor

Open TimLovellSmith opened this issue 2 years ago • 7 comments

ARM API Information (Control Plane)

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow. Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo. If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.

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. By default, Azure SDKs of all languages (.NET/Python/Java/JavaScript for both management-plane SDK and data-plane SDK, Go for management-plane SDK only ) MUST be refreshed with/after swagger of new version is published. If you prefer NOT to refresh any specific SDK language upon swagger updates in the current PR, please leave details with justification here.

Contribution checklist (MS Employees Only):

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

Applicability: :warning:

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 the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review. Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version -[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits. You can use OpenAPIHub to initialize the PR for adding a new version. For 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 you have any breaking changes as defined in the Breaking Change Policy, request approval from the Breaking Change Review Board.

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Additional details on the process and office hours are on the Breaking Change Wiki.

NOTE: To update API(s) in public preview for over 1 year (refer to Retirement of Previews)

Please follow the link to find more details on PR review process.

TimLovellSmith avatar Mar 28 '23 00:03 TimLovellSmith

Hi, @TimLovellSmith 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]

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

    Swagger Generation Artifacts

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

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

    Rule Message
    ️❌SDK Breaking Change Tracking failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️❌ azure-sdk-for-net-track2 failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-sdk-for-python-track2 warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-sdk-for-java warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]

    Only 0 items are rendered, please refer to log for more details.

    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]

    Only 0 items are rendered, please refer to log for more details.

    ️⚠️ azure-resource-manager-schemas warning [Detail]

    Only 0 items are rendered, please refer to log for more details.

    ️❌ azure-powershell failed [Detail]

    Only 0 items are rendered, please refer to log for more details.

    Posted by Swagger Pipeline | How to fix these errors?

    Generated ApiView

    Language Package Name ApiView Link
    Swagger Microsoft.Cache https://apiview.dev/Assemblies/Review/7c09648e492141c2b4629a8a2b66fd47
    Go sdk/resourcemanager/redisenterprise/armredisenterprise https://apiview.dev/Assemblies/Review/e019963f030d40d49e762d98232feb75
    Java azure-resourcemanager-redisenterprise https://apiview.dev/Assemblies/Review/d8e1ec3f7bc344bcb39daffb6bd5fcd6
    JavaScript @azure/arm-redisenterprisecache https://apiview.dev/Assemblies/Review/7919d5bc1a1b4dbaa2b554011474fe73

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

    Swagger Validation Report

    ️❌BreakingChange: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/23f92a685d06165a46b7f7fa710a98bff680f25a/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json",
    "old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json",
    "details":"Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.48/common/temp/node_modules/.pnpm/@[email protected]/node_modules/autorest/dist/app.js" --v2 --input-file=specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=new --output-folder=/tmp\nERROR: Referenced file 'file:///mnt/vss/_work/1/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePrivateEndpointConnectionsUpdate.json' not found\n - file:///mnt/vss/work/1/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json:1513:12 ($.paths["/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Cache/redisEnterprise/clusterName/privateEndpointConnections/privateEndpointConnectio"
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️❌LintDiff: 19 Errors, 17 Warnings failed [Detail]
    compared tags (via openapi-validator v2.0.0) new version base version
    package-preview-2023-03 package-preview-2023-03(23f92a6) package-preview-2023-03(main)

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

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

    Rule Message Related RPC [For API reviewers]
    ConsistentPatchProperties The property 'properties.sku' in the request body either not apppear in the resource model or has the wrong level.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L359
    RPC-Patch-V1-03
    ConsistentPatchProperties The property 'properties.tags' in the request body either not apppear in the resource model or has the wrong level.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L359
    RPC-Patch-V1-03
    PostOperationAsyncResponseValidation An async POST operation must set long running operation options 'x-ms-long-running-operation-options'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L815
    RPC-Async-V1-11
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L865
    RPC-Async-V1-07
    PostOperationAsyncResponseValidation An async POST operation must set long running operation options 'x-ms-long-running-operation-options'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L889
    RPC-Async-V1-11
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L939
    RPC-Async-V1-07
    PostOperationAsyncResponseValidation An async POST operation must set long running operation options 'x-ms-long-running-operation-options'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L963
    RPC-Async-V1-11
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1013
    RPC-Async-V1-07
    PostOperationAsyncResponseValidation An async POST operation must set long running operation options 'x-ms-long-running-operation-options'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1037
    RPC-Async-V1-11
    LroLocationHeader A 202 response should include an Location response header.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1087
    RPC-Async-V1-07
    invalid-ref Could not read file: file:///mnt/vss/_work/1/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePrivateEndpointConnectionsUpdate.json .
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1512
    PathResourceTypeNameCamelCase Resource type naming must follow camel case. Path: '/Subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/OperationStatuses/{operationId}'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1641
    SubscriptionsAndResourceGroupCasing The path segment Subscriptions should be subscriptions.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1641
    SubscriptionIdParameterInOperations Parameter 'subscriptionId' is not allowed in the operations section, define it in the global parameters section instead/Parameter '#/paths/~1Subscriptions~1{subscriptionId}~1providers~1Microsoft.Cache~1locations~1{location}~1OperationStatuses~1{operationId}/get/parameters/0' is referenced but not defined in the global parameters section of Service Definition
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1649
    RequiredReadOnlyProperties Property 'provisioningState' is a required property. It should not be marked as 'readonly'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1816
    RequiredReadOnlyProperties Property 'provisioningState' is a required property. It should not be marked as 'readonly'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1952
    RequiredReadOnlyProperties Property 'id' is a required property. It should not be marked as 'readonly'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2138
    RequiredReadOnlyProperties Property 'status' is a required property. It should not be marked as 'readonly'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2138
    RequiredReadOnlyProperties Property 'provisioningState' is a required property. It should not be marked as 'readonly'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2278
    :warning: XmsExamplesRequired Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L63
    :warning: PutRequestResponseScheme A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'Databases_Create' Request Model: 'parameters[5].schema' Response Model: 'responses[200].schema'
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L574
    :warning: XmsLongRunningOperationOptions The x-ms-long-running-operation-options should be specified explicitly to indicate the type of response header to track the async operation.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L815
    RPC-Async-V1-06
    :warning: XmsLongRunningOperationOptions The x-ms-long-running-operation-options should be specified explicitly to indicate the type of response header to track the async operation.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L889
    RPC-Async-V1-06
    :warning: XmsLongRunningOperationOptions The x-ms-long-running-operation-options should be specified explicitly to indicate the type of response header to track the async operation.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L963
    RPC-Async-V1-06
    :warning: XmsLongRunningOperationOptions The x-ms-long-running-operation-options should be specified explicitly to indicate the type of response header to track the async operation.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1037
    RPC-Async-V1-06
    :warning: XmsExamplesRequired Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1596
    :warning: ParameterNotDefinedInGlobalParameters Parameter 'subscriptionId' is referenced but not defined in the global parameters section of Service Definition
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1648
    :warning: SchemaDescriptionOrTitle Schema should have a description or title.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1719
    :warning: SchemaDescriptionOrTitle Schema should have a description or title.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L1740
    :warning: SchemaDescriptionOrTitle Schema should have a description or title.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2044


    The following errors/warnings exist before current PR submission:

    Rule Message
    :warning: 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: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2202
    :warning: 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: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2206
    :warning: SchemaDescriptionOrTitle Schema should have a description or title.
    Location: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L2592
    ️❌Avocado: 4 Errors, 0 Warnings failed [Detail]
    Rule Message
    NO_JSON_FILE_FOUND The JSON file is not found but it is referenced from the readme file.
    readme: specification/redisenterprise/resource-manager/readme.md
    json: preview/2023-03-01-preview/examples/RedisEnterprisePrivateEndpointConnectionsUpdate.json
    UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
    readme: specification/redisenterprise/resource-manager/readme.md
    json: preview/2023-03-01-preview/examples/RedisEnterprisePrivateLinksListByCluster.json
    MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/providers/Microsoft.Cache/locations/{}/operationsStatus/{} is not in the default tag. Please make sure the missing API swaggers are in the default tag.
    readme: specification/redisenterprise/resource-manager/readme.md
    json: Microsoft.Cache/preview/2022-11-01-preview/redisenterprise.json
    MISSING_APIS_IN_DEFAULT_TAG The default tag should contain all APIs. The API path /subscriptions/{}/providers/Microsoft.Cache/locations/{}/skus is not in the default tag. Please make sure the missing API swaggers are in the default tag.
    readme: specification/redisenterprise/resource-manager/readme.md
    json: Microsoft.Cache/preview/2022-11-01-preview/redisenterprise.json
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️❌~[Staging] ServiceAPIReadinessTest: 0 Errors, 0 Warnings failed [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
    ️❌ModelValidation: 2 Errors, 0 Warnings failed [Detail]
    Rule Message
    unacceptable kind of an object to dump [object Error] "role":"Model Validation",
    "url":"https://github.com/Azure/azure-rest-api-specs/blob/23f92a685d06165a46b7f7fa710a98bff680f25a/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json"
    unacceptable kind of an object to dump [object Error] "role":"Model Validation",
    "url":"https://github.com/Azure/azure-rest-api-specs/blob/23f92a685d06165a46b7f7fa710a98bff680f25a/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json"
    ️❌SemanticValidation: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    INTERNAL_ERROR Unexpected internal error: ENOENT: no such file or directory, open '/mnt/vss/_work/1/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePrivateEndpointConnectionsUpdate.json' Error: ENOENT: no such file or directory, open '/mnt/vss/_work/1/azure-rest-api-specs/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/examples/RedisEnterprisePrivateEndpointConnectionsUpdate.json'
    JsonUrl: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️❌SpellCheck: 2 Errors, 0 Warnings failed [Detail]
    Rule Message
    HowToFix Unknown word (fush), please fix the error or add words to ./custom-words.txt
    path: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L962:154
    HowToFix Unknown word (Fush), please fix the error or add words to ./custom-words.txt
    path: Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json#L967:35
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️❌TypeSpec Validation: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    MissingTypeSpecFile "details":"The swagger specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json is generated from typespec files,
    but the typespec project with '@azure-tools/typespec-autorest' emitter is missing in the PR. Please add the missing typespec project or emitter configuration."
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    Next Steps to Merge

    Next steps that must be taken to merge this PR:
    • ❌ Your PR has breaking changes in the generated SDK for go (label: CI-BreakingChange-Go). Refer to step 3 in the PR workflow diagram (even if your PR is for data plane, not ARM).
    • ❌ Your PR has breaking changes in the generated SDK for javascript (label: CI-BreakingChange-JavaScript). Refer to step 3 in the PR workflow diagram (even if your PR is for data plane, not ARM).
    • ❌ The required check named TypeSpec Validation has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it.