Skip to content

[PS] Migrate ProviderHub module to autorest v4 #27864

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 12 commits into
base: main
Choose a base branch
from

Conversation

JoyerJin
Copy link
Contributor

@JoyerJin JoyerJin commented May 28, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 09:45
Copy link

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

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

Migrate the ProviderHub PowerShell module to Autorest v4 by updating documentation, scripts, and metadata to support new parameter-set patterns and simplified type/interface names.

  • Introduced new parameter sets (*ViaJsonFilePath, *ViaJsonString, *ViaIdentityProviderRegistrationExpanded) across docs and cmdlets
  • Replaced long-form Api20201120.* type references with simplified interfaces (I*)
  • Updated README directives for Autorest v4 and refreshed AssemblyInfo metadata

Reviewed Changes

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

Show a summary per file
File Description
src/ProviderHub/ProviderHub.Autorest/docs/*.md Expanded syntax sections, added JSON/identity parameter sets, updated types
src/ProviderHub/ProviderHub.Autorest/custom/*.ps1 Added new parameter-set attributes, deprecate DefaultProfile, update mapping logic
src/ProviderHub/ProviderHub.Autorest/README.md Refined Autorest v4 directive variants
src/ProviderHub/ProviderHub.Autorest/Properties/AssemblyInfo.cs Introduced assembly metadata and version info
src/ProviderHub/ProviderHub.Autorest/docs/Az.ProviderHub.md Updated module GUID and cmdlet summaries
Comments suppressed due to low confidence (2)

src/ProviderHub/ProviderHub.Autorest/custom/Remove-AzProviderHubSku.ps1:68

  • The parameter set name 'DeleteViaIdentityResourcetypeRegistration' uses lowercase 't' in 'Resourcetype'. For consistency, rename it to 'DeleteViaIdentityResourceTypeRegistration'.
[Parameter(ParameterSetName='DeleteViaIdentityResourcetypeRegistration', Mandatory)]

src/ProviderHub/ProviderHub.Autorest/docs/Az.ProviderHub.md:5

  • The Help Version (1.0.0.0) does not align with the AssemblyInfo version (0.3.1). Consider synchronizing these versions for consistency.
Help Version: 1.0.0.0

### -JsonString
Json string supplied to the Manifest operation

```yaml
Copy link
Preview

Copilot AI May 28, 2025

Choose a reason for hiding this comment

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

The -JsonString parameter block is missing a 'Parameter Sets' entry. Add 'Parameter Sets: ManifestViaJsonString' to match the other parameter definitions.

Copilot uses AI. Check for mistakes.

@notyashhh notyashhh force-pushed the joyer/providerhub-migrate-v4 branch from d120f7b to 2329db5 Compare May 29, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants