Migrate StorageCache to TypeSpec - #29987
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR migrates the Az.StorageCache module’s code generation configuration from the legacy AutoRest README-based setup to a TypeSpec (tspconfig.yaml) workflow, and refreshes the module’s generated artifacts and reference help accordingly.
Changes:
- Added TypeSpec PowerShell emitter configuration for StorageCache (
tspconfig.yaml) and updated solution wiring to point to the generated project location. - Regenerated/updated module manifest and cmdlet reference help markdown content for the StorageCache cmdlets.
- Updated StorageCache changelog and generation metadata files to reflect the new generation output.
Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/StorageCache/StorageCache/help/Update-AzStorageCacheImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Update-AzStorageCacheExpansionJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Update-AzStorageCacheAutoImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Update-AzStorageCacheAutoExportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Update-AzStorageCacheAmlFileSystem.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Test-AzStorageCacheAmlFileSystemSubnet.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Stop-AzStorageCacheAmlFilesystemArchive.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Remove-AzStorageCacheImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Remove-AzStorageCacheExpansionJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Remove-AzStorageCacheAutoImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Remove-AzStorageCacheAutoExportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Remove-AzStorageCacheAmlFileSystem.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/New-AzStorageCacheImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/New-AzStorageCacheExpansionJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/New-AzStorageCacheAutoImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/New-AzStorageCacheAutoExportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/New-AzStorageCacheAmlFileSystem.md | Help text update (SubscriptionId and Zone description) |
| src/StorageCache/StorageCache/help/Invoke-AzStorageCacheAmlFileSystemArchive.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheExpansionJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheAutoImportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheAutoExportJob.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystemSubnetRequiredSize.md | Help text update (SubscriptionId description) |
| src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystem.md | Help syntax/parameter-set labeling updates |
| src/StorageCache/StorageCache/ChangeLog.md | Changelog entry added for upcoming release |
| src/StorageCache/StorageCache/Az.StorageCache.psd1 | Manifest refreshed (RequiredModules, formatting, generation date) |
| src/StorageCache/StorageCache.sln | Solution updated to reference generated project path |
| src/StorageCache/StorageCache.Autorest/tspconfig.yaml | New TypeSpec PowerShell emitter configuration |
| src/StorageCache/StorageCache.Autorest/tsp-location.yaml | New TypeSpec provenance/location file |
| src/StorageCache/StorageCache.Autorest/resources/README.md | Added non-packaged resources folder documentation |
| src/StorageCache/StorageCache.Autorest/README.md | Removed legacy AutoRest YAML configuration section |
| src/StorageCache/StorageCache.Autorest/Properties/AssemblyInfo.cs | Assembly metadata/header updated |
| src/StorageCache/StorageCache.Autorest/generate-info.json | Regeneration marker updated |
| src/StorageCache/StorageCache.Autorest/docs/Update-AzStorageCacheImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Update-AzStorageCacheExpansionJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Update-AzStorageCacheAutoImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Update-AzStorageCacheAutoExportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Update-AzStorageCacheAmlFileSystem.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Test-AzStorageCacheAmlFileSystemSubnet.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Stop-AzStorageCacheAmlFilesystemArchive.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Remove-AzStorageCacheImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Remove-AzStorageCacheExpansionJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Remove-AzStorageCacheAutoImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Remove-AzStorageCacheAutoExportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Remove-AzStorageCacheAmlFileSystem.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/New-AzStorageCacheImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/New-AzStorageCacheExpansionJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/New-AzStorageCacheAutoImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/New-AzStorageCacheAutoExportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/New-AzStorageCacheAmlFileSystem.md | Docs text update (SubscriptionId and Zone description) |
| src/StorageCache/StorageCache.Autorest/docs/Invoke-AzStorageCacheAmlFileSystemArchive.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheExpansionJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAutoImportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAutoExportJob.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAmlFileSystemSubnetRequiredSize.md | Docs text update (SubscriptionId description) |
| src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAmlFileSystem.md | Docs syntax/parameter-set labeling updates |
| src/StorageCache/StorageCache.Autorest/docs/Az.StorageCache.md | Module docs metadata refreshed (Module Guid) |
Suppressed comments (3)
src/StorageCache/StorageCache/ChangeLog.md:22
- The new changelog entry says there are no user-facing changes, but this PR updates the module manifest's required Az.Accounts version (5.5.0 -> 5.5.2), which is user-impacting (minimum dependency requirement). The entry should reflect that.
src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystem.md:27 - The
List/List1labels appear swapped: this syntax block includes-ResourceGroupName, which corresponds to parameter setList1in the exported cmdlet mapping. Renaming the header avoids misleading help output.
src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystem.md:139 ResourceGroupNameis currently documented as belonging to parameter setsGet, List, but in the exported cmdlet definition it'sGet, List1. The help parameter set list should match the cmdlet's actual ParameterSetName values.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Changes for the upcoming release should go under the section titled "Upcoming Release", and should adhere to the following format: | ||
|
|
||
| ## Upcoming Release | ||
| * Internal code generation updated. No user-facing changes in this release. |
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
| // Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. |
| directory: C:\Users\v-jiasenglaw\Project\azure-rest-api-specs\specification\storagecache\resource-manager\Microsoft.StorageCache\StorageCache\tspconfig.yaml | ||
| commit: | ||
| repo: |
| emitter-output-dir: "{output-dir}/{service-dir}/StorageCache/StorageCache.Autorest" | ||
| clear-output-folder: true | ||
| azure: true | ||
| module-version: 0.3.0 |
| ## SYNTAX | ||
|
|
||
| ### List (Default) | ||
| ### List1 (Default) |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 58 out of 58 changed files in this pull request and generated no new comments.
Suppressed comments (11)
src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystem.md:15
- The SYNTAX section marks the default parameter set as "List1", but the cmdlet proxy uses CmdletBinding(DefaultParameterSetName='List'). The default label here should be "List" to match actual behavior when calling the cmdlet with no arguments.
src/StorageCache/StorageCache/help/Get-AzStorageCacheAmlFileSystem.md:27 - This SYNTAX label is swapped: the parameter set that requires -ResourceGroupName corresponds to "List1" in the cmdlet proxy, not "List". Keeping the label aligned with the proxy parameter set names avoids confusion when reading parameter-set-specific help.
src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAmlFileSystem.md:32 - This SYNTAX label is swapped: the parameter set that requires -ResourceGroupName corresponds to "List1" in the cmdlet proxy, not "List". Aligning the label with the proxy parameter set names keeps the help consistent.
### List
src/StorageCache/StorageCache/ChangeLog.md:8
- The top HTML comment block is intended as a template/instructions and shouldn’t contain a real release entry. The "Internal code generation updated..." line should only appear under the actual "## Upcoming Release" section (outside the HTML comment).
src/StorageCache/StorageCache.Autorest/tspconfig.yaml:7 - tspconfig.yaml sets module-version to 0.3.0, but the module manifest (Az.StorageCache.psd1) is already at 0.4.0. Leaving this at 0.3.0 risks the TypeSpec emitter regenerating metadata with a downgraded module version.
src/StorageCache/StorageCache.Autorest/Properties/AssemblyInfo.cs:5 - The file header now contains duplicated copyright text and both MIT and Apache license statements. This is internally inconsistent and can create licensing ambiguity; it should match the single MIT header used by the generated StorageCache .cs files.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
src/StorageCache/StorageCache.sln:5
- The solution file now starts with a blank first line. .sln files typically start immediately with the header line; keeping a leading blank line can cause noisy diffs and occasional tooling quirks.
src/StorageCache/StorageCache.Autorest/docs/Get-AzStorageCacheAmlFileSystem.md:15 - The SYNTAX section marks the default parameter set as "List1", but the cmdlet proxy uses DefaultParameterSetName='List'. The default label here should be "List" to match actual behavior for the no-argument invocation.
This issue also appears on line 32 of the same file.
### List1 (Default)
src/StorageCache/StorageCache/help/New-AzStorageCacheAmlFileSystem.md:529
- The -Zone parameter description was reduced to a generic sentence, but the cmdlet’s proxy comment documents an important constraint (single-element array). The help should retain that guidance so users don’t pass multiple zones and hit a service-side validation error.
src/StorageCache/StorageCache/help/Update-AzStorageCacheImportJob.md:239 - Grammar: "an UUID" should be "a UUID".
src/StorageCache/StorageCache.Autorest/tsp-location.yaml:1 - This path uses Windows-style backslashes, while other TypeSpec modules in this repo use forward slashes. Using forward slashes here avoids path parsing issues across platforms and keeps it consistent with the other tsp-location.yaml files.
directory: specification\storagecache\resource-manager\Microsoft.StorageCache\StorageCache
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.