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

Removing the Anonymous types in public-preview version #24515

Merged
merged 4 commits into from
Jun 21, 2023

Conversation

Mohana-Krishna-Nali
Copy link
Contributor

Issues:

 Anonymous types during SDK generation.

Solution:

Created the models for each anonymous type and referred.

@openapi-workflow-bot
Copy link

Hi, @Mohana-Krishna-Nali 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 Jun 20, 2023

    Swagger Validation Report

    ️❌BreakingChange: 59 Errors, 5 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    AccessControlLists.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    L3IsolationDomains.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    NetworkDeviceSkus.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    NetworkFabricControllers.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    NetworkFabrics.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    NetworkRackSkus.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)
    RoutePolicies.json 2023-02-01-preview(397072c) 2023-02-01-preview(main)

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

    Rule Message
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/AccessControlLists.json#L361:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/AccessControlLists.json#L361:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/AccessControlLists.json#L444:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/AccessControlLists.json#L498:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2108:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2108:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2810:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2118:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2821:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2135:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2108:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2108:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2810:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2118:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2821:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2135:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2342:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2378:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2353:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2401:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2358:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2418:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2635:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2431:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2646:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2460:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2362:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2485:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2747:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2557:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2758:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2579:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2342:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2378:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2353:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2401:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2358:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2418:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2635:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2431:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2646:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2460:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2362:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2485:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2747:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2557:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2758:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2579:15
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L140:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L140:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L145:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L183:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L174:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L244:11
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L287:11
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkDeviceSkus.json#L262:17
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkFabricControllers.json#L517:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkFabricControllers.json#L517:9
    1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
    New: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkFabricControllers.json#L521:9
    Old: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkFabricControllers.json#L540:9
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 0 Warnings warning [Detail]
    compared tags (via openapi-validator v2.1.3) new version base version
    package-2023-02-01-preview package-2023-02-01-preview(397072c) package-2023-02-01-preview(main)

    The following errors/warnings exist before current PR submission:

    Rule Message
    ⚠️ AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
    Location: Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/L3IsolationDomains.json#L2116
    ⚠️ 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.ManagedNetworkFabric/preview/2023-02-01-preview/NetworkFabricControllers.json#L538
    ️️✔️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]
    ️️✔️TypeSpecAPIView 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.
    ️️✔️TypeSpec Validation succeeded [Detail] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️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 Jun 20, 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


    ️⚠️ azure-sdk-for-java warning [Detail]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from f5b74b0. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    • ️✔️@azure/arm-managednetworkfabric [View full logs]  [Release SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️️✔️ azure-sdk-for-net succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from f5b74b0. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      command	autorest --version=2.0.4421 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION --use=@microsoft.azure/autorest.csharp@2.3.101 --csharp-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/managednetworkfabric/resource-manager/readme.md
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      warn	No package detected after generation
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from f5b74b0. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]  notice
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.1 -> 9.7.1
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.1>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@9.7.1` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️track2_azure-mgmt-managednetworkfabric [View full logs]  [Release SDK Changes]
      info	[Changelog]   - Initial Release
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 20, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Java azure-resourcemanager-managednetworkfabric Create ApiView failed. Please ask PR assignee for help
    JavaScript @azure/arm-managednetworkfabric Create ApiView failed. Please ask PR assignee for help

    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required resource-manager RPaaS labels Jun 20, 2023
    @openapi-workflow-bot
    Copy link

    Hi @Mohana-Krishna-Nali, 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.

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Jun 20, 2023
    @v-xuto v-xuto self-requested a review June 21, 2023 03:19
    @v-xuto v-xuto added the Approved-OkToMerge <valid label in PR review process>add this label when assignee approve to merge the updates label Jun 21, 2023
    @qiaozha
    Copy link
    Member

    qiaozha commented Jun 21, 2023

    @openapi-workflow-bot openapi-workflow-bot bot added commitAfterSignedOff and removed Approved-OkToMerge <valid label in PR review process>add this label when assignee approve to merge the updates labels Jun 21, 2023
    @AzureRestAPISpecReview AzureRestAPISpecReview added ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jun 21, 2023
    @ms-henglu ms-henglu added the ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review label Jun 21, 2023
    @openapi-workflow-bot openapi-workflow-bot bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jun 21, 2023
    @v-xuto
    Copy link
    Member

    v-xuto commented Jun 21, 2023

    @qiaozha Author has resolved the comments, please re-review

    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 ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required commitAfterSignedOff ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager RPaaS
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    7 participants