From fca33614a4911804162714bf7f821fadfad1f2c7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 15:00:06 +0000 Subject: [PATCH 1/3] Initial plan From d046e8dae9768066b1a4fb43ba4900099de87a4b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 15:24:35 +0000 Subject: [PATCH 2/3] chore(http-client-csharp): bump TCGC to 0.71.2 Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com> --- .../test/Unit/operation-paging.test.ts | 12 ++--- .../emitter/test/Unit/usage.test.ts | 4 +- .../Local/Sample-TypeSpec/Sample-TypeSpec.tsp | 44 +++++++++---------- .../Sample-TypeSpec/Sample-TypeSpec.tsp | 34 +++++++------- packages/http-client-csharp/package-lock.json | 10 ++--- packages/http-client-csharp/package.json | 4 +- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/packages/http-client-csharp/emitter/test/Unit/operation-paging.test.ts b/packages/http-client-csharp/emitter/test/Unit/operation-paging.test.ts index 613e9b01aec..bb7ea11c408 100644 --- a/packages/http-client-csharp/emitter/test/Unit/operation-paging.test.ts +++ b/packages/http-client-csharp/emitter/test/Unit/operation-paging.test.ts @@ -234,7 +234,7 @@ describe("Next link operations", () => { it("includes protocol-only response model in code model (issue #9391)", async () => { const program = await typeSpecCompile( ` - @convenientAPI(false) + @convenientAPI(false, "csharp") @list op link(): { @pageItems @@ -267,7 +267,7 @@ describe("Next link operations", () => { it("includes nested enum from protocol-only response model in code model", async () => { const program = await typeSpecCompile( ` - @convenientAPI(false) + @convenientAPI(false, "csharp") @list op link(): { @pageItems @@ -309,7 +309,7 @@ describe("Next link operations", () => { it("includes deeply nested enum from protocol-only response model in code model", async () => { const program = await typeSpecCompile( ` - @convenientAPI(false) + @convenientAPI(false, "csharp") @list op link(): { @pageItems @@ -359,7 +359,7 @@ describe("Next link operations", () => { it("does not deduplicate enums with the same name but different namespaces", async () => { const program = await typeSpecCompile( ` - @convenientAPI(false) + @convenientAPI(false, "csharp") @list op link(): { @pageItems @@ -413,7 +413,7 @@ describe("Next link operations", () => { }; } - @convenientAPI(false) + @convenientAPI(false, "csharp") @list @route("/a") op listA(): { @@ -423,7 +423,7 @@ describe("Next link operations", () => { next?: url; }; - @convenientAPI(false) + @convenientAPI(false, "csharp") @list @route("/b") op listB(): { diff --git a/packages/http-client-csharp/emitter/test/Unit/usage.test.ts b/packages/http-client-csharp/emitter/test/Unit/usage.test.ts index b08f8a13a97..821fcc247be 100644 --- a/packages/http-client-csharp/emitter/test/Unit/usage.test.ts +++ b/packages/http-client-csharp/emitter/test/Unit/usage.test.ts @@ -633,7 +633,7 @@ interface LegacyLro { @doc("Gets the status and details of the Radiology Insights job.") @get @route("/radiology-insights/jobs/{id}") - @convenientAPI(false) + @convenientAPI(false, "csharp") getJob is HealthInsightsLongRunningPollOperation; #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "Polling through operation-location" @@ -643,7 +643,7 @@ interface LegacyLro { @doc("Creates a Radiology Insights job with the given request body.") @pollingOperation(LegacyLro.getJob) @route("/radiology-insights/jobs") - @convenientAPI(true) + @convenientAPI(true, "csharp") createJob is HealthInsightsLongRunningRpcOperation< RadiologyInsightsData, RadiologyInsightsResult diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp index c08983e122b..eec3c1af563 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/Sample-TypeSpec.tsp @@ -515,7 +515,7 @@ op sayHi( @route("/againHi") @doc("Return hi again") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloAgain( @header p1: string, @body action: RoundTripModel, @@ -539,43 +539,43 @@ op noContentTypeOverride(info: Wrapper): RoundTripModel; @route("/demoHi") @doc("Return hi in demo2") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloDemo2(): Thing; @route("/literal") @doc("Create with literal value") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op createLiteral(@body body: Thing): Thing; @route("/helloLiteral") @doc("Send literal parameters") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloLiteral(@header p1: "test", @path p2: 123, @query p3: true): Thing; @route("/top") @doc("top level method") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op topAction(@path action: utcDateTime): Thing; @route("/top2") @doc("top level method2") @get -@convenientAPI(false) +@convenientAPI(false, "csharp") op topAction2(): Thing; @route("/patch") @doc("top level patch") @patch -@convenientAPI(true) +@convenientAPI(true, "csharp") op patchAction(@body body: Thing): Thing; @route("/anonymousBody") @doc("body parameter without body decorator") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op anonymousBody( ...Thing, @query requiredQueryParam: "someRequiredLiteralQueryParam", @@ -585,7 +585,7 @@ op anonymousBody( @route("/friendlyName") @doc("Model can have its friendly name") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op friendlyModel(...NotFriend): NotFriend; op addTimeHeader(@header("Repeatability-First-Sent") repeatabilityFirstSent?: utcDateTime): void; @@ -593,13 +593,13 @@ op addTimeHeader(@header("Repeatability-First-Sent") repeatabilityFirstSent?: ut @route("/projectedName") @doc("Model can have its projected name") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op projectedNameModel(...ModelWithClientName): ModelWithClientName; @route("/returnsAnonymousModel") @doc("return anonymous model") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op returnsAnonymousModel(): { @body body: {}; }; @@ -612,32 +612,32 @@ op getUnknownValue(): DaysOfWeekExtensibleEnum; @doc("When set protocol false and convenient true, then the protocol method should be internal") @route("internalProtocol") @post -@convenientAPI(true) -@protocolAPI(false) +@convenientAPI(true, "csharp") +@protocolAPI(false, "csharp") op internalProtocol(@body body: Thing): Thing; @doc("When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one") @route("stillConvenient") @get -@convenientAPI(true) -@protocolAPI(false) +@convenientAPI(true, "csharp") +@protocolAPI(false, "csharp") op stillConvenient(): void; @route("/headAsBoolean") @doc("head as boolean.") @head -@convenientAPI(true) +@convenientAPI(true, "csharp") op headAsBoolean(@path id: string): void; @route("/WithApiVersion") @doc("Return hi again") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op WithApiVersion(@header p1: string, @query apiVersion: string): void; @route("/link") @doc("List things with nextlink") -@convenientAPI(true) +@convenientAPI(true, "csharp") @list op ListWithNextLink(): { @pageItems @@ -648,7 +648,7 @@ op ListWithNextLink(): { @route("/linkString") @doc("List things with nextlink") -@convenientAPI(true) +@convenientAPI(true, "csharp") @list op ListWithStringNextLink(): { @pageItems @@ -659,7 +659,7 @@ op ListWithStringNextLink(): { @route("/continuation") @doc("List things with continuation token") -@convenientAPI(true) +@convenientAPI(true, "csharp") @list op ListWithContinuationToken(@query @continuationToken token?: string): { @pageItems @@ -670,7 +670,7 @@ op ListWithContinuationToken(@query @continuationToken token?: string): { @route("/continuation/header") @doc("List things with continuation token header response") -@convenientAPI(true) +@convenientAPI(true, "csharp") @list op ListWithContinuationTokenHeaderResponse(@query @continuationToken token?: string): { @pageItems @@ -685,7 +685,7 @@ model Page { @route("list/paging") @doc("List things with paging") -@convenientAPI(true) +@convenientAPI(true, "csharp") @list op ListWithPaging(): Page; diff --git a/packages/http-client-csharp/generator/TestProjects/Plugin/Sample-TypeSpec/Sample-TypeSpec.tsp b/packages/http-client-csharp/generator/TestProjects/Plugin/Sample-TypeSpec/Sample-TypeSpec.tsp index a4b8cc1a0ed..3fd8f5a822c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Plugin/Sample-TypeSpec/Sample-TypeSpec.tsp +++ b/packages/http-client-csharp/generator/TestProjects/Plugin/Sample-TypeSpec/Sample-TypeSpec.tsp @@ -250,7 +250,7 @@ op sayHi( @route("/againHi") @doc("Return hi again") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloAgain( @header p1: string, @body action: RoundTripModel, @@ -261,7 +261,7 @@ op helloAgain( @route("/noContentType") @doc("Return hi again") @get -@convenientAPI(false) +@convenientAPI(false, "csharp") op noContentType( @header p1: string, @body action: RoundTripModel, @@ -271,49 +271,49 @@ op noContentType( @route("/demoHi") @doc("Return hi in demo2") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloDemo2(): Thing; @route("/literal") @doc("Create with literal value") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op createLiteral(@body body: Thing): Thing; @route("/helloLiteral") @doc("Send literal parameters") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op helloLiteral(@header p1: "test", @path p2: 123, @query p3: true): Thing; @route("/top") @doc("top level method") @get -@convenientAPI(true) +@convenientAPI(true, "csharp") op topAction(@path action: utcDateTime): Thing; @route("/top2") @doc("top level method2") @get -@convenientAPI(false) +@convenientAPI(false, "csharp") op topAction2(): Thing; @route("/patch") @doc("top level patch") @patch -@convenientAPI(true) +@convenientAPI(true, "csharp") op patchAction(@body body: Thing): Thing; @route("/anonymousBody") @doc("body parameter without body decorator") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op anonymousBody(...Thing): Thing; @route("/friendlyName") @doc("Model can have its friendly name") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op friendlyModel(...NotFriend): NotFriend; op addTimeHeader(@header("Repeatability-First-Sent") repeatabilityFirstSent?: utcDateTime): void; @@ -321,13 +321,13 @@ op addTimeHeader(@header("Repeatability-First-Sent") repeatabilityFirstSent?: ut @route("/projectedName") @doc("Model can have its projected name") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op projectedNameModel(...ModelWithProjectedName): ModelWithProjectedName; @route("/returnsAnonymousModel") @doc("return anonymous model") @post -@convenientAPI(true) +@convenientAPI(true, "csharp") op returnsAnonymousModel(): { @body body: {}; }; @@ -340,19 +340,19 @@ op getUnknownValue(): DaysOfWeekExtensibleEnum; @doc("When set protocol false and convenient true, then the protocol method should be internal") @route("internalProtocol") @post -@convenientAPI(true) -@protocolAPI(false) +@convenientAPI(true, "csharp") +@protocolAPI(false, "csharp") op internalProtocol(@body body: Thing): Thing; @doc("When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one") @route("stillConvenient") @get -@convenientAPI(true) -@protocolAPI(false) +@convenientAPI(true, "csharp") +@protocolAPI(false, "csharp") op stillConvenient(): void; @route("/headAsBoolean") @doc("head as boolean.") @head -@convenientAPI(true) +@convenientAPI(true, "csharp") op headAsBoolean(@path id: string): void; diff --git a/packages/http-client-csharp/package-lock.json b/packages/http-client-csharp/package-lock.json index 53618d73c4e..cd471246166 100644 --- a/packages/http-client-csharp/package-lock.json +++ b/packages/http-client-csharp/package-lock.json @@ -14,7 +14,7 @@ "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.44", "@azure-tools/typespec-azure-core": "0.71.0", - "@azure-tools/typespec-client-generator-core": "0.71.1", + "@azure-tools/typespec-client-generator-core": "0.71.2", "@microsoft/api-extractor": "^7.52.2", "@types/node": "~22.12.0", "@typespec/compiler": "1.15.0", @@ -41,7 +41,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.71.0 <0.72.0 || ~0.72.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.71.1 <0.72.0 || ~0.72.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.71.2 <0.72.0 || ~0.72.0-0", "@typespec/compiler": "^1.15.0", "@typespec/events": ">=0.85.0 <0.86.0 || ~0.86.0-0", "@typespec/http": "^1.15.0", @@ -123,9 +123,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.71.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.71.1.tgz", - "integrity": "sha512-OQsNmNID1OTRqO2EUfHNO0cTRn44tMKVfNrNfVcdBGJv5scsin8U+KiR90M/5nbTqOsGPXSxxExVl7yMuuGk2g==", + "version": "0.71.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.71.2.tgz", + "integrity": "sha512-/HOH9tPXczcue6t1FHVFRXjTU1/S27dZQd85akgs+KlK1jkA8blgPndB51jSYwn8V+D+9XmHRSRtcQLAW582UA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/packages/http-client-csharp/package.json b/packages/http-client-csharp/package.json index 02c908d03e8..4038deafb6c 100644 --- a/packages/http-client-csharp/package.json +++ b/packages/http-client-csharp/package.json @@ -59,7 +59,7 @@ ], "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.71.0 <0.72.0 || ~0.72.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.71.1 <0.72.0 || ~0.72.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.71.2 <0.72.0 || ~0.72.0-0", "@typespec/compiler": "^1.15.0", "@typespec/events": ">=0.85.0 <0.86.0 || ~0.86.0-0", "@typespec/http": "^1.15.0", @@ -72,7 +72,7 @@ "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.44", "@azure-tools/typespec-azure-core": "0.71.0", - "@azure-tools/typespec-client-generator-core": "0.71.1", + "@azure-tools/typespec-client-generator-core": "0.71.2", "@microsoft/api-extractor": "^7.52.2", "@types/node": "~22.12.0", "@typespec/compiler": "1.15.0", From 1f6f7a649dd25595085b9a719f77f9727b415cc6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 20:40:34 +0000 Subject: [PATCH 3/3] chore(http-client-csharp): regenerate test libraries Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com> --- .../emitters/clients/http-client-csharp/reference/emitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/content/docs/docs/emitters/clients/http-client-csharp/reference/emitter.md b/website/src/content/docs/docs/emitters/clients/http-client-csharp/reference/emitter.md index ad1da10028b..f0ecc759ce8 100644 --- a/website/src/content/docs/docs/emitters/clients/http-client-csharp/reference/emitter.md +++ b/website/src/content/docs/docs/emitters/clients/http-client-csharp/reference/emitter.md @@ -40,7 +40,7 @@ See [Configuring output directory for more info](https://typespec.io/docs/handbo **Type:** `string | object` -Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`. For multi-service packages, provide a map from each service namespace's full name to its desired version; services not listed default to their latest version. +Use this flag if you would like to generate the sdk only for a specific version. Default value is the latest version. Also accepts values `latest` and `all`. For multi-service packages, provide a map from each service namespace to its desired version. Nested namespaces must be represented as nested objects in `tspconfig.yaml`; services not listed default to their latest version. **Options:**