Skip to content

Comments

Update http-client-csharp-mgmt to latest azure generator and TypeSpec dependencies#56370

Merged
live1206 merged 13 commits intomainfrom
copilot/update-mgmt-generator-dependencies
Feb 24, 2026
Merged

Update http-client-csharp-mgmt to latest azure generator and TypeSpec dependencies#56370
live1206 merged 13 commits intomainfrom
copilot/update-mgmt-generator-dependencies

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Update http-client-csharp-mgmt generator dependencies to align with the latest TypeSpec ecosystem versions.

Changes

Generator (eng/packages/http-client-csharp-mgmt)

  • package.json

    • @azure-typespec/http-client-csharp: 1.0.0-alpha.20260213.2 -> 1.0.0-alpha.20260219.1
    • @typespec/http-client-csharp: added pin at 1.0.0-alpha.20260219.2 (devDependency)
    • @azure-tools/typespec-client-generator-core: 0.64.4 -> 0.65.3
    • @azure-tools/typespec-liftr-base: 0.11.0 -> 0.12.0
    • All TypeSpec devDependencies aligned: @typespec/compiler 1.8->1.9, @typespec/rest/versioning/xml/streams 0.78->0.79, @azure-tools/typespec-* 0.64->0.65
  • package-lock.json: regenerated via npm install

Emitter version (eng/)

  • eng/Packages.Data.props: AzureGeneratorVersion 1.0.0-alpha.20260213.2 -> 1.0.0-alpha.20260219.1

Note: Emitter package JSON files (eng/azure-typespec-http-client-csharp-*-emitter-package*.json) are not updated in this PR -- they will be updated automatically by a follow-up PR after these generator changes are merged.

Test project fixes

  • generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp: Added @@clientName overrides for Azure.ResourceManager.Legacy.ExtendedLocationOptional and Azure.ResourceManager.Legacy.ManagedServiceIdentityType to resolve duplicate-client-name errors introduced by the stricter @azure-tools/typespec-client-generator-core@0.65.x validation

  • Regenerated test project (Mgmt-TypeSpec/src/Generated/) to reflect code model changes from the updated generator


Copilot AI and others added 2 commits February 20, 2026 18:05
…e generator

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…nt-name errors

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot AI changed the title [WIP] Update mgmt generator to latest azure generator and typespec dependencies Update http-client-csharp-mgmt to latest azure generator and TypeSpec dependencies Feb 20, 2026
Copilot AI requested a review from JoshLove-msft February 20, 2026 18:22
live1206 and others added 2 commits February 24, 2026 10:08
Resolve conflict in eng/Packages.Data.props: take main's UnbrandedGeneratorVersion
(1.0.0-alpha.20260220.2) and PR's AzureGeneratorVersion (1.0.0-alpha.20260219.1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…edLocationOptional

The @FriendlyName("ExtendedLocation") decorator on ExtendedLocationOptional in the ARM
library conflicts with the actual ExtendedLocation type. Using @@clientName to override
doesn't work because TCGC's getLibraryName() skips @@clientName when the override value
equals type.name. Using @@FriendlyName to set the name back to "ExtendedLocationOptional"
correctly resolves the conflict.

Tracked upstream: Azure/typespec-azure#3925

Regenerated test projects to reflect the fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@live1206 live1206 force-pushed the copilot/update-mgmt-generator-dependencies branch from f7c41ef to 0dd8059 Compare February 24, 2026 02:32
@live1206 live1206 marked this pull request as ready for review February 24, 2026 03:02
Copilot AI review requested due to automatic review settings February 24, 2026 03:02
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Contributor

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 http-client-csharp-mgmt generator to the latest @azure-typespec/http-client-csharp version (1.0.0-alpha.20260219.1) and synchronizes all TypeSpec dependencies with the azure generator. The update resolves duplicate-client-name diagnostics introduced by stricter validation in the updated TypeSpec client generator core.

Changes:

  • Updated @azure-typespec/http-client-csharp from 1.0.0-alpha.20260213.2 to 1.0.0-alpha.20260219.1
  • Upgraded TypeSpec compiler and libraries from 1.8.x/0.78.x to 1.9.x/0.79.x, and Azure TypeSpec tools from 0.64.x to 0.65.x
  • Added @@FriendlyName and @@clientName overrides in main.tsp to resolve naming conflicts with legacy ARM types (ExtendedLocationOptional and ManagedServiceIdentityType)
  • Regenerated test project with generator updates: api-version parameters now optional with null checks, URI deserialization uses UriKind.RelativeOrAbsolute, and model names updated per TypeSpec overrides

Reviewed changes

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

Show a summary per file
File Description
eng/packages/http-client-csharp-mgmt/package.json Updated dependency versions for azure generator and all TypeSpec packages; added @typespec/http-client-csharp devDependency to prevent type conflicts
eng/packages/http-client-csharp-mgmt/package-lock.json Regenerated lock file reflecting dependency updates
eng/Packages.Data.props Updated AzureGeneratorVersion to match package.json
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/main.tsp Added @@FriendlyName and @@clientName decorators to resolve duplicate-client-name diagnostics from legacy ARM types
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/tspCodeModel.json Updated api-version parameter from required to optional in method scope
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/RestOperations/*.cs Added null checks before appending/updating api-version query parameters
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/*Serialization.cs Updated URI deserialization to use UriKind.RelativeOrAbsolute constructor parameter
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/ExtendedLocationOptional.* Renamed from ExtendedLocation1 to ExtendedLocationOptional per TypeSpec override
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/BestPracticeData.* Updated to use ExtendedLocationOptional type
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/AzureGeneratorMgmtTypeSpecTestsContext.cs Updated ModelReaderWriter registration for renamed ExtendedLocationOptional
eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/MgmtTypeSpecTestsModelFactory.cs Updated factory method parameter type for ExtendedLocationOptional

live1206 and others added 6 commits February 24, 2026 11:42
Take main's newer UnbrandedGeneratorVersion (1.0.0-alpha.20260223.4) and
keep PR's AzureGeneratorVersion (1.0.0-alpha.20260219.1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…agedServiceIdentityType override

Since issue Azure/typespec-azure#3925 is by design, use @@clientName instead of
@@FriendlyName to resolve the duplicate-client-name error. The @@clientName must
use a name different from type.name due to TCGC's getLibraryName() skip logic.

Removed @@clientName override for ManagedServiceIdentityType as it is not needed -
no duplicate-client-name error occurs without it.

Regenerated test projects (includes TCGC 0.65.3 api-version null check removal).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The override was incorrectly removed - it passed locally likely due to npm
package hoisting differences but CI hits the duplicate-client-name error
between Legacy and CommonTypes ManagedServiceIdentityType unions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- @azure-typespec/http-client-csharp: 1.0.0-alpha.20260219.1 -> 1.0.0-alpha.20260223.1
- @typespec/http-client-csharp: 1.0.0-alpha.20260219.2 -> 1.0.0-alpha.20260223.4
- AzureGeneratorVersion in Packages.Data.props: 1.0.0-alpha.20260223.1
- azure-typespec-http-client-csharp-emitter-package: updated to match
- azure-typespec-http-client-csharp-mgmt-emitter-package: updated all deps to 0.65.x/1.9.x
- Regenerated test projects

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@live1206 live1206 force-pushed the copilot/update-mgmt-generator-dependencies branch from fb322ab to ce6fb73 Compare February 24, 2026 07:29
…n mgmt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@live1206 live1206 force-pushed the copilot/update-mgmt-generator-dependencies branch from ce6fb73 to 45e84ce Compare February 24, 2026 07:32
@live1206 live1206 merged commit 1eee22c into main Feb 24, 2026
48 checks passed
@live1206 live1206 deleted the copilot/update-mgmt-generator-dependencies branch February 24, 2026 08:17
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.

Update mgmt generator to latest azure generator and typespec dependencies

4 participants