Skip to content

[Do not merge] [Test] Tsp gen SRP swagger migration test #28314

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blueww
Copy link
Member

@blueww blueww commented Jul 31, 2025

Please don't review it.
This is just for a test, to validate the SRP swagger -> TSP migration in Azure/azure-rest-api-specs#35403

Several issues :

  1. Swagger need update by adding "x-ms-external": true, to swagger "CloudError" and "CloudErrorBody", or PSH build will fail with "'CloudError' is an ambiguous reference between 'Microsoft.Azure.Management.Storage.Models.CloudError' and 'Microsoft.Rest.Azure.CloudError'". Temp workaround by update TSP gen swagger (not update TSP). Track official fix in Migrate Storage from swagger to TypeSpec azure-rest-api-specs#35403 (comment)
  2. Test case "TestAzureStorageAccountHierarchicalNamespaceUpgrade" failed since the resourcegroups in request Uri case change in swagger: old swagger has "resourcegroups", new swagger has "resourceGroups". This looks old swagger issue. Fixed by update test record file Uri from "resourcegroups" to "resourceGroups".
  3. Test case "TestShareSnapshot" failed since the request Uri query parameter sequence change from "$expand=snapshot&sapi-version=2025-01-01" to "api-version=2025-01-01&$expand=snapshots". This is caused by "ApiVersionParameter" in old swagger is the last two, in new swagger is the first. Track by Migrate Storage from swagger to TypeSpec azure-rest-api-specs#35403 (comment). Temprate fix test case by update test record file.

Besides that, has run SRP regression test, all cases pass excepted keyvault related cases failed which is expected since roleassignment fail recently.

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

@blueww blueww changed the base branch from Az.Storage-preview to main July 31, 2025 10:00
@blueww blueww changed the title [Do not merge] [Test] Tsp gen swagger migration test [Do not merge] [Test] Tsp gen SRP swagger migration test Jul 31, 2025
@Copilot Copilot AI review requested due to automatic review settings August 4, 2025 09:19
@blueww blueww force-pushed the TSPmigration-SDK branch from 840fab5 to 1396859 Compare August 4, 2025 09:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Azure Storage PowerShell module from using the 2024-01-01 API version to the new 2025-01-01 API version, representing a migration from Swagger specifications to TSP (TypeSpec) format. The changes include API version updates, documentation improvements, and configuration adjustments.

  • Updated API version from 2024-01-01 to 2025-01-01 across all storage services
  • Migrated from individual Swagger JSON files to a consolidated OpenAPI specification
  • Enhanced documentation with additional parameter descriptions and clarifications

Reviewed Changes

Copilot reviewed 15 out of 278 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Get-AzStorageFileServiceUsage.Recording.json Updated test recording to use 2025-01-01 API version
Get-AzStorageAccountMigration.Recording.json Updated test recording to use 2025-01-01 API version
generate-info.json Updated generation ID for new build
Documentation files (*.md) Added UUID requirement descriptions and improved parameter documentation
UX configuration files (*.json) Updated API versions and resource type configurations
README.md Migrated from multiple Swagger files to consolidated OpenAPI specification
Properties/AssemblyInfo.cs Added empty line at end of file
Comments suppressed due to low confidence (1)

src/Storage/Storage.Autorest/README.md:36

  • The API version 2025-01-01 may not exist yet. As of my knowledge cutoff in January 2025, this version was not available. Please verify that this API version has been officially released.
  - https://github.com/blueww/azure-rest-api-specs/blob/ec65b60fa0dc4ff769722bdb46e4c494d035cf56/specification/storage/resource-manager/Microsoft.Storage/stable/2025-01-01/openapi.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant