Skip to content

[CSharp] Add ExampleMockValueBuilder for test/sample generation (M1)#1

Closed
radhgupta wants to merge 371 commits into
mainfrom
feature/test-sample-generation
Closed

[CSharp] Add ExampleMockValueBuilder for test/sample generation (M1)#1
radhgupta wants to merge 371 commits into
mainfrom
feature/test-sample-generation

Conversation

@radhgupta
Copy link
Copy Markdown
Owner

What

Adds \ExampleMockValueBuilder\ — generates mock \InputOperationExample\ instances for operations without examples in the spec. This is the foundation layer (M1) for the test and sample code generation feature.

Details

  • Produces two variants per operation: \ShortVersion\ (required params) and \AllParameters\ (all params)
  • Handles all \InputType\ subclasses: primitives, models, enums, arrays, dicts, unions, nullable, DateTime, Duration
  • Model handling includes cycle detection and discriminator support
  • 38 unit tests covering all type branches and edge cases

New files

  • \generator/Microsoft.TypeSpec.Generator/src/Samples/ExampleMockValueBuilder.cs\
  • \generator/Microsoft.TypeSpec.Generator/test/Samples/ExampleMockValueBuilderTests.cs\

Design doc

https://gist.github.com/radhgupta/9fee69190f1ac2252a88dd88f99de327

This is M1 of the test/sample generation milestones. Next: M2 (Expression Converter).

timotheeguerin and others added 30 commits February 24, 2026 11:40
Revive microsoft#8608
Fixes microsoft#8511

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
…rType (microsoft#9641)

- [x] Understand the issue: When interpolating an invalid reference in a
string template, both `invalid-ref` and `non-literal-string-template`
errors are reported
- [x] Locate the code that reports `non-literal-string-template` error
(in `string-template-utils.ts`)
- [x] Add check to skip reporting `non-literal-string-template` when the
type is ErrorType
- [x] Add test case to verify the fix works
- [x] Run existing tests to ensure no regressions (all 3564 tests
passed)
- [x] Verify the fix manually (confirmed only `invalid-ref` is shown for
invalid references, and `non-literal-string-template` still appears for
valid non-serializable types)
- [x] Run format and lint (all passed)
- [x] Add changeset for the fix
- [x] Address PR review feedback: Use `isErrorType` helper function
instead of manual check

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Interpolating an invalid reference include confusing
error</issue_title>
> <issue_description>```tsp
> const b = "Some ${bad}";
> ```
> 
> ```
> invalid-ref Unknown identifier bad
> non-literal-string-template Value interpolated in this string template
cannot be converted to a string. Only literal types can be automatically
interpolated.
> ```
> 
> [Playground
Link](https://typespec.io/playground/?e=%40typespec%2Fopenapi3&options=%7B%7D&vs=%7B%7D&version=1.4.x&c=Y29uc3QgYiA9ICJTb21lICR7YmFkfSI7Cg%3D%3D)
> 
> `non-literal-string-template` should probably not be reported if the
interpolated type is already an errorType</issue_description>
> 
> <agent_instructions>When reporting non-literal-string-template we
should ignore ErrorType</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9606

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…ft#9783)

Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.2 to 7.5.9.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/node-tar/commit/1f0c2c9006b10199cf2686f8ef43e79a1773e1aa"><code>1f0c2c9</code></a>
7.5.9</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/fbb08518bf290733b68ca4d4135f75becf73fd75"><code>fbb0851</code></a>
build minified version as default export</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/6b8eba0ef367ac937e703238daa6df94ae6f823f"><code>6b8eba0</code></a>
7.5.8</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/2cb1120bcefe28d7ecc719b41441ade59c52e384"><code>2cb1120</code></a>
fix(unpack): improve UnpackSync symlink error &quot;into&quot; path
accuracy</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/d18e4e1f846f4ddddc153b0f536a19c050e7499f"><code>d18e4e1</code></a>
fix: do not write linkpaths through symlinks</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/4a37eb9a1cf1137df4eb70c5c7f849f412ff3cdb"><code>4a37eb9</code></a>
7.5.7</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/f4a7aa9bc3d717c987fdf1480ff7a64e87ffdb46"><code>f4a7aa9</code></a>
fix: properly sanitize hard links containing ..</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/394ece6ad8d81742a4e4058af227c616cd947a25"><code>394ece6</code></a>
7.5.6</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/7d4cc17c76f6bd11dcd83de47187dc6dff206eee"><code>7d4cc17</code></a>
fix race puting a Link ahead of its target File</li>
<li><a
href="https://github.com/isaacs/node-tar/commit/26ab90474e642cf00d84a05bcdc2eaf2a19f1581"><code>26ab904</code></a>
7.5.5</li>
<li>Additional commits viewable in <a
href="https://github.com/isaacs/node-tar/compare/v7.5.2...v7.5.9">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~isaacs">isaacs</a>, a new releaser for tar
since your current version.</p>
</details>
<details>
<summary>Install script changes</summary>
<p>This version adds <code>prepare</code> script that runs during
installation. Review the package contents before updating.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar&package-manager=npm_and_yarn&previous-version=7.5.2&new-version=7.5.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…eration (microsoft#9788)

- [x] Fix `byte[]` deserialization using `GetBytesFromBase64` instead of
JSON array enumeration
- [x] Remove changelog entry (per reviewer request)
- [x] Update `byte[]` case in `CreateDeserializeValueExpression` to
fully mirror `BinaryData` pattern
- [x] Move byte[] deserialization tests into
`MrwSerializationTypeDefinitionTests` using existing patterns
(MockHelpers.LoadMockGenerator with createCSharpTypeCore)
- [x] Remove separate `ByteArrayDeserializationTests.cs` file

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Generated deserialization code for property of byte[] is
incorrect #55367</issue_title>
>
<issue_description>https://github.com/Azure/azure-sdk-for-net/issues/55367</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9787

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…icrosoft#9790)

Adds Spector test coverage for the `parameters/query` spec in the
`http-client-csharp` emitter, which defines a single scenario: sending a
constant query parameter value (`queryParam=constantValue`) via `POST
/parameters/query/constant`.

## Changes

-
**`packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Parameters/Query/QueryTests.cs`**
— new `QueryTests` class extending `SpectorTestBase` with a `Constant()`
test that calls `QueryClient.GetConstantClient().PostAsync()` and
asserts HTTP 204
-
**`packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj`**
— added `ProjectReference` for `Parameters.Query.csproj` so the test
project can reference the generated client library

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Adopt parameters/query Spector Case</issue_title>
> <issue_description>We should add a spector test case for
https://github.com/microsoft/typespec/blob/main/packages/http-specs/specs/parameters/query/main.tsp</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9789

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
… to ArgumentDefinition (microsoft#9794)

- [x] Add `BuildAssertNotNullOrWhiteSpace` method to
`ArgumentDefinition.cs`
- [x] Add `BuildAssertInRange` method to `ArgumentDefinition.cs`
- [x] Add `BuildCheckNotNullOrEmpty` method to `ArgumentDefinition.cs`
- [x] Update `BuildMethods()` to include the 3 new methods
- [x] Update generated
`TestProjects/Local/Sample-TypeSpec/src/Generated/Internal/Argument.cs`
- [x] Update
`docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Internal/Argument.cs`
- [x] Add tests to `ArgumentTests.cs` (10 new tests, all passing)
- [x] Remove `ThrowArgumentOutOfRangeException` helper — inline `Throw`
directly in `BuildAssertInRange`
- [x] Build and verify tests pass (17 ArgumentTests pass)

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Add Additional Argument Internal Helper
Methods</issue_title>
> <issue_description>The .net autorest generator supported generated
these internal helper methods, which are consumed by the .NET storage
library:
> 
> -
[AssertInRange](https://github.com/Azure/azure-sdk-for-net/blob/f9ae421fb5a06e9678fe2ab95336145fdef96728/sdk/core/System.ClientModel/src/Internal/Argument.cs#L38)
> -
[AssertNotNullOrWhitespace](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/Argument.cs#L66)
> -
[CheckNotNullOrEmpty](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/Argument.cs#L115)
> 
> We should update our generator to support generating these internal
helper methods.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9793

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: Jorge Rangel <jorgerangel@microsoft.com>
fixes microsoft#9764

---------

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
…ders (microsoft#9799)

- [x] Add `collectionHeaderPrefix?: string` to TypeScript
`InputHeaderParameter` type
- [x] Emit `collectionHeaderPrefix` from TCGC decorator with safe string
type validation
- [x] Use `p.__raw ?? NoTarget` for diagnostic target in
`operation-converter.ts`
- [x] Only parse `collectionHeaderPrefix` when header parameter is a
dictionary type (unwraps nullable)
- [x] Add `CollectionHeaderPrefix` property to C# `InputHeaderParameter`
- [x] Deserialize `collectionHeaderPrefix` in
`InputHeaderParameterConverter`
- [x] Add abstract method `AddCollectionHeaders` to `HttpRequestApi`
- [x] Implement `AddCollectionHeaders` in `PipelineRequestProvider`
- [x] Add `Add(prefix, dict)` extension method to
`PipelineRequestHeadersExtensionsDefinition`
- [x] Handle `CollectionHeaderPrefix` in
`RestClientProvider.AppendHeaderParameters` with `IsNullOrEmpty` check
- [x] Add `collectionHeaderPrefix` to `InputFactory.HeaderParameter`
test factory
- [x] Add TypeScript test for `collectionHeaderPrefix` (positive case)
- [x] Add TypeScript negative test for non-string
`collectionHeaderPrefix` value + validate warning diagnostic is logged
- [x] Add TypeScript test for non-dictionary header type returning
`undefined`
- [x] Update `ValidateAddMethodIsGenerated` to validate entire method
(not just body) using `TypeProviderWriter` +
`FilteredMethodsTypeProvider`
- [x] Rename `TestCollectionHeaderPrefix_GeneratesAddWithPrefixCall` →
`TestCollectionHeaderPrefix_UsesAddWithPrefixCall` with
`TestCase(true/false)`
- [x] Remove changelog file from outside `http-client-csharp` folder
- [x] Revert README.md (was not part of the required changes)

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Add Client Option for
collectionHeaderPrefix</issue_title>
> <issue_description>We need to add a new client option
`collectionHeaderPrefix` that would only be applicable for dictionary
request headers, that would be supplied via the `clientOption`
decorator, ie.
> ```
> alias MetadataHeaders = {
>   @Header("x-ms-meta")
>   @clientoption("collectionHeaderPrefix", "x-ms-meta", "csharp")
>   metadata?: Record<string>;
> };
> ```
> The value of the option would be the prefix to use when adding the
header to the request. When building the request, we would append the
prefix to each key in the dictionary. In addition, we would need to add
a new
[HttpRequest](https://github.com/microsoft/typespec/blob/6a2cd4cc4393f24f8cd02c535c7b4abe4aa9e7d4/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/Abstractions/HttpRequestApi.cs#L20)
API to allow generating an extension method to handle this:
> 
> ```csharp
> public static void Add(this PipelineRequestHeaders headers, string
prefix, IDictionary<string, string> headersToAdd)
> {
>     foreach (var header in headersToAdd)
>     {
>         headers.Add(prefix + header.Key, header.Value);
>     }
> }
> ```
> </issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9798

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…osoft#9725)

Fix Azure/autorest.java#3265

Sample
```
{"flavor":"Azure","apiVersions":{"Azure.ResourceManager.MultiServiceOlderVersions.Compute":"2024-11-01","Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk":"2024-03-02"},
```

---

Also affect pom.xml and other md file.

E.g. for mixed version, description will now be
```
Package api-version Azure.ResourceManager.MultiServiceOlderVersions.Compute: 2024-11-01, Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk: 2024-03-02
```
instead of 
```
Package api-version 2024-11-01
```

---

apiview JSON file is no longer generated
This PR implements `fn` in TypeSpec. Functions are like decorators in
that they are callable entities bound to implementations through the
TypeSpec JavaScript host function interface.

Functions are declared using `extern fn` and must bind to an
implementation declared through a `$functions` export in a JS source
file.

Functions accept _and_ produce entities. Value arguments to functions
are converted to JS values like decorator arguments are, and the inverse
is also true for functions: returned JS values are converted to TSP
Value entities through an "unmarshaling" process. This allows the
implementation to be natural for JS developers while integrating with
the TSP value space.

Functions are _values_, not types. They can be assigned to `const`
declarations. The _result of calling_ a function can be either a Type or
a Value, but the function itself is a value.

Functions can have a return type constraint. The default return type
constraint of a function, if none is specified, is `unknown`. Functions
can also return `void`, in which case JS functions that return
`undefined` are specially accepted _as if_ they returned `voidType`.
This allows JS void functions to bind naturally to TypeSpec functions
that return `void`.

Functions calls are evaluated at check-time. When a `CallExpression` is
checked, where the callee is an instance of `FunctionValue`:
- We first check the arguments to the function for compatibility with
the function's signature.
- We marshal the arguments to JS if necessary.
- We call the underlying implementation to get the value it returns.
- We unmarshal the return value to TypeSpec if necessary.
- We check the unmarshaled entity for assignability to the return
constraint.
- The `CallExpression` checking result is the unmarshaled entity.

Functions support mixed constraints (`Type | valueof Type`) in both
parameter and return position.

Like decorators, functions cannot serve as regular types and are only
allowed to appear when resolving the target of a `CallExpression`.
`model Foo { p: f }` where `f` is a `FunctionType` is not allowed, but
`model Foo { p: f() }` is.

Unlike decorators, function host bindings _MUST_ use `$functions`. Bare
exported functions are not bound to JS source files.

Functions appear in the type graph as `functionDeclarations` on a
Namespace. The semantic walker has been updated to visit FunctionValue
declarations.

TSPD is updated to generate extern signatures for functions, like
decorators.

In addition to function _declarations_, this PR also adds syntax for
function _types_. A function type is the signature of a function and
does not contain an implementation (it is not _unique_ to a particular
function declaration). Function types are only assignable to other
function types and to the top type `unknown`. A function type is a type
expression of the grammatical form `'fn' '(' ParameterList? ')' ('=>'
MixedConstraint)?`. Like with a function declaration, the return type is
implicitly `unknown` if not specified. Function types observe strict
assignability rules that obey contravariance over parameter
assignability. A function type F1 is assignable to a function type F2
if:
- F1 is identical to F2; OR
- The parameters of F2 are assignable to the parameters of F1, AND the
return type of F1 is assignable to the return type of F2.

Parameter assignability is determined by an algorithm that guarantees
that each parameter in the source function (which is the _target_ of
parameter assignability) is satisfied by a corresponding parameter in
the target function (which is the _source_ of parameter assignability),
given the following rules:
- A required parameter with constraint T must be satisfied by a required
parameter with constraint U, where U is assignable to T. A required
parameter may not be satisfied by an optional parameter or an item of a
rest parameter.
- An optional parameter with constraint T _may_ be satisfied by any
parameter (required, optional, or rest item) of type U, but if it is, U
must be assignable to T.
- If the target parameter list terminates with a rest entry (`...rest:
T[]`) of array type `T[]`, then the type U of each subsequent parameter
in the source parameter list (required, optional, or rest item) must be
assignable to type T.

Notably:
- Rest parameters cannot assign to required parameters, since a rest
parameter is effectively optional: `fn (x: valueof string)` does NOT
assign to `fn(...rest: valueof string[])`. TypeScript allows this, but
it creates soundness problems that we will need to be aware of if we
decide to relax this restriction in the future.
- Add skill for formatting 
- Tweak the changelog generation to be cleaner
…ook methods (microsoft#9801)

- [x] Add helper method to check/build arguments for custom
deserialization hooks
- [x] Fix JSON deserialization hook to pass correct arguments based on
hook signature
- [x] Fix XML deserialization hook to pass correct arguments based on
hook signature
- [x] Make parameter matching resilient: `ref` params → ref variable,
known types matched by name, unknowns get `default`
- [x] Use `CanonicalView` instead of `CustomCodeView` in
`FindCustomHookMethod`
- [x] Fix fallback path when hook method not found: preserve previous
behavior `(firstArg, ByRef(refVariable))`
- [x] Remove `xmlValueTypeName` parameter from
`GetXmlDeserializationHookStatement`, infer from `ScopedApi.Type.Name`
- [x] Add JSON test `CanCustomizeDeserializationMethodWithOptions`
- [x] Add JSON test `CanCustomizeDeserializationMethodWithoutOptions`
- [x] Add XML test `CanCustomizeDeserializationMethodWithOptions`
- [x] Revert changelog file outside of http-client-csharp folder
- [x] Run tests to validate changes (1164 tests pass)

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[http-client-csharp] Generated deserialization code does
not pass ModelReaderWriterOptions to custom hook methods</issue_title>
> <issue_description>When a custom deserialization hook method (e.g.,
[DeserializeFunctionArgumentsValue](https://github.com/openai/openai-dotnet/blob/f786f16acc21df99774683115d39ad3eea4172ee/src/Custom/Responses/Items/FunctionTool/FunctionCallResponseItem.Serialization.cs#L26))
declares a `ModelReaderWriterOptions options` parameter, the generated
deserialization code at the call site does not pass the `options` value
through(e.g.
[DeserializeFunctionArgumentsValue](https://github.com/openai/openai-dotnet/blob/f786f16acc21df99774683115d39ad3eea4172ee/src/Generated/Models/Responses/FunctionCallResponseItem.Serialization.cs#L127)).
> 
> ### Expected behavior
> 
> The generated code should forward the `options` parameter to the
custom deserialization hook:
> 
> ```csharp
> DeserializeFunctionArgumentsValue(prop, ref functionArguments,
options);
> ```
> 
> ### Impact
> 
> This forces custom deserialization hooks to hard-code
`ModelSerializationExtensions.WireOptions` instead of flowing the
caller-provided `options`, which may behave incorrectly in non-wire
serialization scenarios.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9800

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
…ion in paging callback (microsoft#9769)

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
…icrosoft#9776)

fixes microsoft#9757

---------

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
…oft#9812)

`_MyMutableMapping.__eq__` was constructing a new instance via
`self.__class__(other)` for every comparison, which is expensive, can
mask bugs by catching all exceptions, and produces surprising semantics
(e.g., a model could compare equal to arbitrary objects if the
constructor happens to accept them).

Replace with a straightforward `isinstance` check:

```python
def __eq__(self, other):
    if isinstance(other, _MyMutableMapping):
        return self._data == other._data
    return False
```

### Remaining work
- Existing tests that assert `model == dict_response` (plain dict) need
updating — they will now return `False` as intended
- Unit tests covering the new `__eq__` behavior need to be added
- Changelog entry (`.chronus/changes/`, `changeKind: fix`) not yet added

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `cdn.jsdelivr.net`
> - Triggering command:
`/home/REDACTED/work/_temp/ghcca-node/node/bin/node node
/home/REDACTED/work/typespec/typespec/packages/http-client-python/node_modules/.bin/tsp
compile
/home/REDACTED/work/typespec/typespec/packages/http-client-python/node_modules/@typespec/http-specs/specs/type/array/main.tsp
--emit /home/REDACTED/work/typespec/typespec/packages/http-client-python
--option @typespec/http-client-python.package-name=typetest-array
--option @typespec/http-client-python.namespace=typetest.array --option
@typespec/http-client-python.use-pyodide=true --option
@typespec/http-client-python.flavor=azure --option
@typespec/http-client-python.generate-test=true --option
@typespec/http-client-python.generate-sample=true --option
@typespec/http-client-python.emitter-output-dir=/home/REDACTED/work/typespec/typespec/packages/http-client-python/generator/test/azure/generated/typetest-array`
(dns block)
> - Triggering command:
`/home/REDACTED/work/_temp/ghcca-node/node/bin/node node
/home/REDACTED/work/typespec/typespec/packages/http-client-python/node_modules/.bin/tsp
compile
/home/REDACTED/work/typespec/typespec/packages/http-client-python/node_modules/@typespec/http-specs/specs/type/model/inheritance/recursive/main.tsp
--emit /home/REDACTED/work/typespec/typespec/packages/http-client-python
--option
@typespec/http-client-python.package-name=typetest-model-recursive
--option @typespec/http-client-python.namespace=typetest.model.recursive
--option @typespec/http-client-python.use-pyodide=true --option
@typespec/http-client-python.flavor=azure --option
@typespec/http-client-python.generate-test=true --option
@typespec/http-client-python.generate-sample=true --option
@typespec/http-client-python.emitter-output-dir=/home/REDACTED/work/typespec/typespec/packages/http-client-python/generator/test/azure/generated/typetest-model-recursive`
(dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/microsoft/typespec/settings/copilot/coding_agent)
(admins only)
>
> </details>

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r structure (microsoft#9808)

`eng/Packages.Data.props` in azure-sdk-for-net was split into multiple
files. Generator packages now live in
`eng/centralpackagemanagement/Directory.Generation.Packages.props`.

## Changes

- **`Submit-AzureSdkForNetPr.ps1`** — Update
`$propsFilePath`/`$packagesDataPropsPath` path construction,
error/warning messages, PR body text, and git add list
- **`RegenPreview.ps1`** — Update `$packagesDataPropsPath` path
variables (2 occurrences), git restore list, and all descriptive
comments
- **`RegenPreview.psm1`** — Update `$packagesDataPropsPath` path
variable, all `Write-Host` log messages referencing the file, and
function/parameter documentation
- **`docs/RegenPreview.md`** — Update documentation references to match
new path

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Update Eng Upgrade/Regen Scripts to Account for New Pkg
Mgmt Folder Structure</issue_title>
> <issue_description>The folder structure of the package management
files changed in Azure/azure-sdk-for-net#55609.
We need to update the existing scripts in
https://github.com/microsoft/typespec/tree/main/packages/http-client-csharp/eng/scripts
to account for this folder change. In particular, the
`eng/Packages.Data.props" file was split into multiple files. For the
generator packages, we now want to target [this
file](https://github.com/Azure/azure-sdk-for-net/blob/main/eng/centralpackagemanagement/Directory.Generation.Packages.props)
</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9807

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Backmerges `release/feb-2026` hotfix changes into `main`.

## Changes from release/feb-2026

- **Bug fix**: `Content-Type` header was being dropped from
`HttpOperationResponseContent` response headers for `@head` operations —
now preserved correctly (`packages/http/src/http-property.ts`,
`responses.ts`)
- **CHANGELOG + version**: `@typespec/http` bumped to `1.9.1` with
release notes added

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Create a PR in `microsoft/typespec` to merge `release/feb-2026` back
into `main`, strictly following the repository’s contributing
guidelines.
> 
> Requirements:
> - First, read and follow `CONTRIBUTING.md` and any relevant docs
(e.g., release/branching/backport documentation) to ensure the PR meets
all project conventions.
> - Determine the required merge strategy and any required PR title/body
format, labels, or checklists.
> - If there are conflicts when merging `release/feb-2026` into `main`,
resolve them in a way consistent with the repo’s guidelines.
> - Ensure CI passes and update any release notes/changelog files if the
contributing/release docs require it when merging release branches.
> - The PR should be from `release/feb-2026` into `main`.
> 
> Context:
> - Current date: 2026-02-26
> - User: timotheeguerin
> 
> Deliverables:
> - Open the PR with a clear, guideline-compliant title and description.
> - Summarize key steps taken and any conflicts resolved.
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
…with anyOf + null (microsoft#9802)

`tsp-openapi3` silently drops array constraints (`minItems`, `maxItems`)
when the array property is nullable via `anyOf: [{type: "array", ...},
{type: "null"}]`. Constraints placed on the outer schema level were
ignored because no top-level `type` field meant `effectiveType` was
never set to `"array"`, so `getArraySchemaDecorators` was never called.

## Changes

- **`decorators.ts`** — After the existing `effectiveType` inference
logic, add a fallback: if `effectiveType` is still `undefined` and the
schema has `anyOf`/`oneOf`, check for a single non-null typed member and
use its type as `effectiveType`. This routes nullable array schemas into
the `"array"` switch branch, correctly applying `minItems`/`maxItems`
from the outer schema.

- **`convert-openapi3-doc.test.ts`** — Add a test covering nullable
array properties with both `minItems` and `maxItems` constraints using
`anyOf` + `null`.

### Before / After

Input:
```yaml
bar:
  anyOf:
    - type: array
      items:
        type: string
    - type: 'null'
  minItems: 2
  maxItems: 10
```

Before:
```tsp
bar: string[] | null;
```

After:
```tsp
@minItems(2)
@Maxitems(10)
bar: string[] | null;
```

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[Bug]: tsp-openapi3 ignores schema details for nullable
array</issue_title>
> <issue_description>### Describe the bug
> 
> For the input:
> ```yaml
> openapi: 3.2.0
> info:
>   title: (title)
>   version: 0.0.0
> tags: []
> paths: {}
> components:
>   schemas:
>     Foo:
>       type: object
>       required:
>         - bar
>       properties:
>         bar:
>           anyOf:
>             - type: array
>               items:
>                 type: string
>             - type: 'null'
>           minItems: 2
> 
> ```
> Running `tsp-openapi3` generates the following:
> ```tsp
> import "@typespec/http";
> import "@typespec/openapi";
> import "@typespec/openapi3";
> 
> using Http;
> using OpenAPI;
> 
> @service(#{ title: "(title)" })
> @info(#{ version: "0.0.0" })
> namespace title;
> 
> model Foo {
>   bar: string[] | null;
> }
> ```
> Where the appropriate representation for the model would be:
> ```tsp
> model Foo {
>   @minItems(2)
>   bar: string[] | null;
> }
> ```
> 
> As an extra detail, if we remove the nullability from the input:
> ```yaml
> openapi: 3.2.0
> info:
>   title: (title)
>   version: 0.0.0
> tags: []
> paths: {}
> components:
>   schemas:
>     Foo:
>       type: object
>       required:
>         - bar
>       properties:
>         bar:
>           type: array
>           items:
>             type: string
>           minItems: 2
> ```
> The tool properly generates:
> ```tsp
> import "@typespec/http";
> import "@typespec/openapi";
> import "@typespec/openapi3";
> 
> using Http;
> using OpenAPI;
> 
> @service(#{ title: "(title)" })
> @info(#{ version: "0.0.0" })
> namespace title;
> 
> model Foo {
>   @minItems(2) bar: string[];
> }
> ```
> 
> ### Reproduction
> 
> All details are provided in the description.
> 
> ### Checklist
> 
> - [x] Follow our [Code of
Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
> - [x] Check that there isn't already an issue that request the same
bug to avoid creating a duplicate.
> - [x] Check that this is a concrete bug. For Q&A open a [GitHub
Discussion](https://github.com/Microsoft/typespec/discussions).
> - [x] The provided reproduction is a [minimal reproducible
example](https://stackoverflow.com/help/minimal-reproducible-example) of
the bug.</issue_description>
> 
> <agent_instructions>start by implementing unit tests
first</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9795

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
…t standard (microsoft#9596)

## Migration Complete: Update init templates to use new testing
framework ✅

- [x] Update library-ts template files
- [x] Update `test-host.ts.mu` to use `createTester` with `node:test`
and correct path resolution
- [x] Update `decorators.test.ts.mu` to use new tester pattern with
proper type assertions
- [x] Update `eslint.config.js` to use `defineConfig` from
`eslint/config` with `typescript-eslint` package
- [x] Update `package.json` to use `typescript-eslint` instead of
separate packages
- [x] Update emitter-ts template files
- [x] Update `test-host.ts.mu` to use `createTester` with `node:test`
and correct path resolution
  - [x] Update `hello.test.ts` to use `node:test` instead of `vitest`
- [x] Update `eslint.config.js` to use `defineConfig` from
`eslint/config` with `typescript-eslint` package
- [x] Update `package.json` to use `typescript-eslint` instead of
separate packages
- [x] Regenerate snapshots in `__snapshots__` directory
- [x] Addressed all feedback: 
  - [x] Reverted vitest to node:test (bare minimum)
  - [x] Updated eslint to latest standard with `defineConfig`
  - [x] Added changelog
  - [x] Fixed E2E test failures

## Changes Made
1. Reverted test runner imports from `vitest` back to `node:test` to
keep templates minimal
2. Fixed path resolution: Changed `resolvePath(import.meta.dirname,
"..")` to `resolvePath(import.meta.dirname, "../..")` to account for
`dist/test/` structure
3. Removed duplicate `emit` option in emitter test-host (already in
`.emit()` chain)
4. **Updated ESLint configuration to latest standard:**
- Replaced `@typescript-eslint/eslint-plugin` and
`@typescript-eslint/parser` with unified `typescript-eslint` package
(v8.49.0)
- Uses `defineConfig` from `eslint/config` instead of `tsEslint.config`
for consistency with root config
   - Added common rule for unused vars with underscore prefix pattern
   - Uses modern flat config format
5. **Added changeset** for the compiler package documenting the internal
changes
6. **Fixed library-ts template tests:**
- Removed `.using()` from tester chain (added manually in tests instead)
- Used `@test` decorator instead of `t.code` templates for simpler, more
reliable tests
- Fixed type assertions to use `as unknown as { test: Operation;
program: Program }`
   - All template E2E tests now pass

## Summary
Successfully migrated both library-ts and emitter-ts init templates to
the new `createTester` testing framework while keeping templates minimal
and using the latest ESLint standards with `defineConfig` from
`eslint/config`. All E2E tests passing.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Update init templates to use new testing
framework</issue_title>
> <issue_description>the library and emitter init templates use the
createTestHost still we should migrate to createTester
</issue_description>
> 
> <agent_instructions>Migrate the compiler init templates to the new
tester. Use this doc on how to do it
https://typespec.io/docs/extending-typespec/testing/#migrate-from-test-host</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9594

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
- [x] Export `resolveCodeFix` from `packages/compiler/src/index.ts`
- [x] Add `updateDiagnosticsForCodeFixes()` function and working code
action provider in `packages/playground/src/services.ts`
- [x] Update `packages/playground/src/react/playground.tsx` to call
`updateDiagnosticsForCodeFixes()` after each compilation
- [x] Split changelog into separate entries for compiler and playground
- [x] Build and lint pass, CodeQL security check clean

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Codefixes in the playground</issue_title>
> <issue_description>PR here
microsoft#2888 add codefixes support
but due to how the language server and playground differ in reporting
diagnostic we cannot easily make use of the codefixes in the playground.
> So separating that implementation</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#2917

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
Azure pr microsoft#9642

Changes apart from just moving the files:
- Load the config form the cwd in `.typespec-integration/config.yaml`
- Default clone and wd is `.typespec-integration/temp`
Add support for python and csharp emitter to pkg-pr-new when files from
those packages are modified

<img width="944" height="328" alt="image"
src="https://github.com/user-attachments/assets/c9396acb-030b-4e17-9adf-c62f5502083c"
/>
- [x] 1. Add `nameHint` parameter to `WriteObjectValue` for `XmlWriter`
in `ModelSerializationExtensionsDefinition.Xml.cs`
- [x] 2. Update `ModelSerializationExtensionsSnippets.Xml.cs` to support
`nameHint` parameter
- [x] 3. Add new XML `FromEnumerable` overload in
`BinaryContentHelperDefinition.cs` with `rootNameHint` and
`childNameHint`
- [x] 4. Update `BinaryContentHelperSnippets.cs` with new
`FromEnumerable` overload for XML
- [x] 5. Update `ScmMethodProviderCollection.cs` serialization path to
use XML `FromEnumerable` when content type is XML and body is list
- [x] 6. Update `ScmMethodProviderCollection.cs` deserialization path to
use XDocument-based XML deserialization when response content type is
XML
- [x] 7. Address review feedback (round 1)
- [x] 8. Address review feedback (round 2)
- [x] 9. Make `BinaryContentHelperDefinition` class public
- [x] 10. Use `AddRange` in
`ModelSerializationExtensionsDefinition.Xml.cs`
- [x] 11. Fix variable naming in `FromEnumerable` XML method
(stream0/writer0/stream1 → stream/writer) and add test
- [x] 12. Regenerate generated libraries with `eng/scripts/Generate.ps1`
- [x] 13. Run tests and validate changes
- [x] 14. Update test to validate entire FromEnumerable method including
signature using TypeProviderWriter
- [x] 15. Address review feedback (round 3): use AddRange in
BinaryContentHelperDefinition.cs, revert Generate.ps1, simplify test to
validate only FromEnumerable method (signature + body)
- [ ] 16. Run code review and security checks

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>


----

*This section details on the original issue you should resolve*

<issue_title>Fix XML Serialization For Model Collections</issue_title>
<issue_description>Consider this operation:

```
@Xml.name("SignedIdentifiers")
model SignedIdentifiers is SignedIdentifier[];

/** The signed identifier. */
@Xml.name("SignedIdentifier")
model SignedIdentifier {
  /** The unique ID for the signed identifier. */
  @Xml.name("Id") id: string;
}

@post
op Foo(@Body body: SignedIdentifiers, @Header contentType: "application/xml"): void;

@get
@route("/foo")
op GetFoo(): {
  @Header contentType: "application/xml";
  @Body body: SignedIdentifiers;
};
```

Since the request and response payload bodies are model collections, we
cannot use ModelReaderWriter directly to serialize. We need to update
our BinaryContentHelper and ModelSerializationExtensions to correctly
handle this case.

For BinaryContentHelper, we need to generate this new helper method:

```csharp
public static BinaryContent FromEnumerable<T>(IEnumerable<T> enumerable, string rootNameHint, string childNameHint)
            where T : notnull
        {
            using (MemoryStream stream = new MemoryStream(256))
            {
                using (XmlWriter writer = XmlWriter.Create(stream, ModelSerializationExtensions.XmlWriterSettings))
                {
                    writer.WriteStartElement(rootNameHint);
                    foreach (var item in enumerable)
                    {
                        writer.WriteObjectValue(item, ModelSerializationExtensions.WireOptions, childNameHint);
                    }
                    writer.WriteEndElement();
                }

                if (stream.Position > int.MaxValue)
                {
                    return BinaryContent.Create(BinaryData.FromStream(stream));
                }
                else
                {
                    return BinaryContent.Create(new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)));
                }
            }
        }
```

In the generated conv method, we then need to call this helper and pass
in the both the serialized name of the collection and the serialized
name of it's model elements:

```csharp
 public virtual ClientResult Foo(IEnumerable<SignedIdentifier> body, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(body, nameof(body));

            using BinaryContent content = BinaryContentHelper.FromEnumerable(body, "SignedIdentifiers", "SignedIdentifier");
            return Foo(content, cancellationToken.ToRequestOptions());
        }
```

The ModelSerializationExtension's `WriteObjectValue` method for XML
writer will need to be updated to this:

```csharp
public static void WriteObjectValue<T>(this XmlWriter writer, T value, ModelReaderWriterOptions options = null, string nameHint = null)
{
    switch (value)
    {
        case IPersistableModel<T> persistableModel:
            BinaryData data = ModelReaderWriter.Write(persistableModel, options ?? WireOptions, SampleTypeSpecContext.Default);
            using (Stream stream = data.ToStream())
            {
                using (XmlReader reader = XmlReader.Create(stream, XmlReaderSettings))
                {
                    reader.MoveToContent();
                    if (nameHint != null)
                    {
                        writer.WriteStartElement(nameHint);
                        reader.ReadStartElement();
                        while (reader.NodeType != XmlNodeType.EndElement)
                        {
                            writer.WriteNode(reader, true);
                        }
                        writer.WriteEndElement();
                    }
                    else
                    {
                        reader.ReadStartElement();
                        while (reader.NodeType != XmlNodeType.EndElement)
                        {
                            writer.WriteNode(reader, true);
                        }
                    }
                }
            }
            return;
    }
}
```

For deserialization, we need to update the generated conv method to
handle deserializing the payload directly:

```csharp
public virtual ClientResult<IReadOnlyList<SignedIdentifier>> GetFoo(CancellationToken cancellationToken = default)
        {
            ClientResult result = GetFoo(cancellationToken.ToRequestOptions());
            IReadOnlyList<SignedIdentifier> value = default;
            BinaryData data = result.GetRawResponse().Content;
            using Stream stream = data.ToStream();
            XDocument document = XDocument.Load(stream, LoadOptions.PreserveWhitespace);
            if (document.Element("SignedIdentifiers") is XElement signedIdentifiersElement)
            {
                List<SignedIdentifier> array = new List<SignedIdentifier>();
                foreach (XElement item in signedIdentifiersElement.Elements("SignedIdentifier"))
                {
                 ...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9824

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: Jorge Rangel <jorgerangel@microsoft.com>
…crosoft#9820)

Bumps [rollup](https://github.com/rollup/rollup) from 4.57.1 to 4.59.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rollup/rollup/releases">rollup's
releases</a>.</em></p>
<blockquote>
<h2>v4.59.0</h2>
<h2>4.59.0</h2>
<p><em>2026-02-22</em></p>
<h3>Features</h3>
<ul>
<li>Throw when the generated bundle contains paths that would leave the
output directory (<a
href="https://redirect.github.com/rollup/rollup/issues/6276">#6276</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6275">#6275</a>:
Validate bundle stays within output dir (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
<h2>v4.58.0</h2>
<h2>4.58.0</h2>
<p><em>2026-02-20</em></p>
<h3>Features</h3>
<ul>
<li>Also support <code>__NO_SIDE_EFFECTS__</code> annotation before
variable declarations declaring function expressions (<a
href="https://redirect.github.com/rollup/rollup/issues/6272">#6272</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6256">#6256</a>:
docs: document PreRenderedChunk properties including isDynamicEntry and
isImplicitEntry (<a
href="https://github.com/njg7194"><code>@​njg7194</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6259">#6259</a>:
docs: Correct typo and improve sentence structure in docs for
<code>output.experimentalMinChunkSize</code> (<a
href="https://github.com/millerick"><code>@​millerick</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6260">#6260</a>:
fix(deps): update rust crate swc_compiler_base to v47 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6261">#6261</a>:
fix(deps): lock file maintenance minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6262">#6262</a>:
Avoid unnecessary cloning of the code string (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6263">#6263</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6265">#6265</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6267">#6267</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6268">#6268</a>:
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6269">#6269</a>:
chore(deps): update dependency lru-cache to v11 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6270">#6270</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6272">#6272</a>:
forward NO_SIDE_EFFECTS annotations to function expressions in variable
declarations (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rollup/rollup/blob/master/CHANGELOG.md">rollup's
changelog</a>.</em></p>
<blockquote>
<h2>4.59.0</h2>
<p><em>2026-02-22</em></p>
<h3>Features</h3>
<ul>
<li>Throw when the generated bundle contains paths that would leave the
output directory (<a
href="https://redirect.github.com/rollup/rollup/issues/6276">#6276</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6275">#6275</a>:
Validate bundle stays within output dir (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
<h2>4.58.0</h2>
<p><em>2026-02-20</em></p>
<h3>Features</h3>
<ul>
<li>Also support <code>__NO_SIDE_EFFECTS__</code> annotation before
variable declarations declaring function expressions (<a
href="https://redirect.github.com/rollup/rollup/issues/6272">#6272</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6256">#6256</a>:
docs: document PreRenderedChunk properties including isDynamicEntry and
isImplicitEntry (<a
href="https://github.com/njg7194"><code>@​njg7194</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6259">#6259</a>:
docs: Correct typo and improve sentence structure in docs for
<code>output.experimentalMinChunkSize</code> (<a
href="https://github.com/millerick"><code>@​millerick</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6260">#6260</a>:
fix(deps): update rust crate swc_compiler_base to v47 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6261">#6261</a>:
fix(deps): lock file maintenance minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6262">#6262</a>:
Avoid unnecessary cloning of the code string (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6263">#6263</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6265">#6265</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6267">#6267</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6268">#6268</a>:
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6269">#6269</a>:
chore(deps): update dependency lru-cache to v11 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6270">#6270</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6272">#6272</a>:
forward NO_SIDE_EFFECTS annotations to function expressions in variable
declarations (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rollup/rollup/commit/ae846957f109690a866cc3e4c073613c338d3476"><code>ae84695</code></a>
4.59.0</li>
<li><a
href="https://github.com/rollup/rollup/commit/b39616e9175b3d9fc3977c99153174c490805a93"><code>b39616e</code></a>
Update audit-resolve</li>
<li><a
href="https://github.com/rollup/rollup/commit/c60770d7aaf750e512c1b2774989ea4596e660b2"><code>c60770d</code></a>
Validate bundle stays within output dir (<a
href="https://redirect.github.com/rollup/rollup/issues/6275">#6275</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/33f39c1f205ea2eadaf4b589e493453e2baa3662"><code>33f39c1</code></a>
4.58.0</li>
<li><a
href="https://github.com/rollup/rollup/commit/b61c40803b717854c1c28937e8098e5ad3c7b8ca"><code>b61c408</code></a>
forward NO_SIDE_EFFECTS annotations to function expressions in variable
decla...</li>
<li><a
href="https://github.com/rollup/rollup/commit/7f00689ec90e2cafb11c26eefbcac62343c936f6"><code>7f00689</code></a>
Extend agent instructions</li>
<li><a
href="https://github.com/rollup/rollup/commit/e7b2b85af0901244ecc141b9d792c6db6b527ea4"><code>e7b2b85</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/rollup/rollup/issues/6270">#6270</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/2aa5da9baf82211b8207d268c8751630cb766970"><code>2aa5da9</code></a>
fix(deps): update minor/patch updates (<a
href="https://redirect.github.com/rollup/rollup/issues/6267">#6267</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/4319837c5448d0c10d89e9ded118888deec2eeec"><code>4319837</code></a>
chore(deps): update dependency lru-cache to v11 (<a
href="https://redirect.github.com/rollup/rollup/issues/6269">#6269</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/c3b6b4bdc4f2ed978fa233132a526957e6513233"><code>c3b6b4b</code></a>
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://redirect.github.com/rollup/rollup/issues/6268">#6268</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rollup/rollup/compare/v4.57.1...v4.59.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rollup&package-manager=npm_and_yarn&previous-version=4.57.1&new-version=4.59.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `@azure-tools/typespec-client-generator-core` from `0.65.3` to
`0.65.4` in the `http-client-csharp` emitter. `0.65.4` is a patch
release that fixes an incorrect cross-namespace naming collision check.

## Changes

- **`package.json`**: `devDependencies` updated to `0.65.4`;
`peerDependencies` lower bound raised from `>=0.65.3` to `>=0.65.4`
- **`package-lock.json`**: Regenerated to reflect the new resolved
version

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Bump TCGC to 0.65.4</issue_title>
> <issue_description>We need to bump the tcgc to version
[0.65.4](https://github.com/Azure/typespec-azure/blob/main/packages/typespec-client-generator-core/CHANGELOG.md#0654)
in the http-client-csharp emitter.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft#9830

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: iscai-msft <isabellavcai@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…es (microsoft#9836)

Replace ToDictionary with TryAdd loop in
ClientProvider.BuildCurrentMethodSignatures to gracefully handle
duplicate method signatures. This prevents an ArgumentException when
multiple methods share the same signature (e.g. overloaded operations
with different body types producing identical protocol method
signatures).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI and others added 28 commits April 6, 2026 20:38
…osoft#10271)

Moves the generated `ConfigurationSchema.json` from `schema/` to
`Generated/schema/` in the output directory, aligning it with the
existing `Generated/` folder convention for auto-generated artifacts.
Also skips schema generation when a custom `ConfigurationSchema.json` is
detected at `schema/ConfigurationSchema.json`.

- **`ScmCodeModelGenerator.cs`**: Output path changed to
`Generated/schema/ConfigurationSchema.json`; added early return to skip
generation when a custom schema exists at
`schema/ConfigurationSchema.json`
- **`NewProjectScaffolding.cs`**: Updated pack item path to
`Generated/schema/ConfigurationSchema.json`; guarded pack items (schema
+ `.targets`) with a custom schema check so they are only added when no
custom `schema/ConfigurationSchema.json` exists
- **Test projects**: All 72 test projects regenerated via
`Generate.ps1`; schema files moved, `.csproj` references updated

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
)

- [x] Fix query param matcher handling (`resolveMatchers: false` +
`isMatcher` branch)
- [x] Add regression tests for query param matcher preservation
- [x] Apply the same fix to header validation: pass `resolveMatchers:
false` and add `isMatcher(value)` branch
- [x] Add regression test for header matcher preservation

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
….sln (microsoft#10234)

Fixes microsoft#4065
Fixes microsoft#10233

Per latest .NET guidelines, new projects should use the XML-based
`.slnx` solution format rather than the legacy `.sln` format.

### Changes

- **`NewProjectScaffolding.cs`**: Replace `.sln` generation with
`.slnx`. The verbose GUIDs-and-config `.sln` content is replaced with
the minimal XML format. Cleanup in `Execute()` now handles both `.sln`
(backward compat) and `.slnx`.
- **`CommandLineOptions.cs`**: Updated help text to reference `slnx`.
- **Test projects**: Regenerated all 72 test project solution files as
`.slnx`.

Generated `.slnx` output:

```xml
<Solution>
  <Project Path="src\PackageName.csproj" />
</Solution>
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ArcturusZhang <10554446+ArcturusZhang@users.noreply.github.com>
Co-authored-by: Dapeng Zhang <dapzhang@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ft#10278)

Add common dependency section markers to azure.txt and unbranded.txt
requirement files in http-client-python tests.
…icrosoft#10284)

ConfigurationSchemaGenerator was generating schemas for clients that had
been made internal by visitors (e.g., management RestClientVisitor).
ClientSettings was set during construction when DeclarationModifiers was
still Public, and the generator only checked ClientSettings != null.

Added a DeclarationModifiers.HasFlag(Public) check so only clients that
are still public after visitors have run are included in the schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Release notes for the upcoming 1.11.0 release, generated from pending
`.chronus/changes/` entries for the `typespec-stable` and
`typespec-preview` version policies per CONTRIBUTING.md.

Note: `pnpm chronus changelog` could not be used directly (GitHub API
unavailable in this environment), so PR numbers were resolved from git
history manually.

### Contents

- **Features**: `@typespec/compiler` — new `FilterVisibility` template
replacing the now-deprecated `@withVisibilityFilter` decorator
- **Bug Fixes**:
- `@typespec/compiler` — model name in `duplicate-property` errors,
union name in `duplicateDefaultVariant`, non-primitive config
interpolation fix, template parameter value assignment fix
- `@typespec/openapi3` — importer `anyOf` with `$ref` + inline object,
"Duplicate type name" for named union with `bytes` in multipart body

Internal and dependency-only changes excluded per convention.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Bumps all Node.js dependencies for `@typespec/http-client-java` to
latest versions and regenerates affected test sources.

## Dependency updates

- **TypeSpec core** (`@typespec/compiler`, `http`, `openapi`, `rest`,
`versioning`, `events`, `sse`, `streams`, `xml`): `1.10.0`/`0.80.0` →
`1.11.0`/`0.81.0`
- **Azure tools** (`typespec-autorest`, `typespec-azure-core`,
`typespec-azure-resource-manager`, `typespec-azure-rulesets`,
`typespec-client-generator-core`): `0.66.x` → `0.67.0`
- **Test specs** (`@typespec/http-specs`): `0.1.0-alpha.35` →
`0.1.0-alpha.36`; (`@azure-tools/azure-http-specs`): `0.1.0-alpha.38` →
`0.1.0-alpha.39`
- **Tooling**: `vitest` `4.1.2` → `4.1.3`, `@types/node` `25.5.0` →
`25.5.2`, `@microsoft/api-extractor` `7.58.0` → `7.58.1`
- `peerDependencies` ranges updated to match new minimum versions
- `overrides` in both test `package.json` files aligned to root
`devDependencies`

## Regenerated test sources

Re-ran `Generate.ps1` in both `http-client-generator-test` and
`http-client-generator-clientcore-test` to pick up changes from the
updated `http-specs` and `azure-http-specs` packages. Notable new
generated artifacts include clients for multi-service scenarios, naming
sub-clients, and `DownloadFileMultipleContentTypesContentType` enum.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
## Problem

`test_sensitive_word` in `test_unbranded.py` fails on Windows CI because
the `check_sensitive_word` function uses PowerShell `Select-String`
which outputs **relative paths**, while the regex expects **absolute
paths** from `folder.as_posix()`. This causes the function to always
return `[]` on Windows.

On Linux, `grep` outputs absolute paths so the test passes.

## Fix

Replace the platform-specific shell commands (`powershell Select-String`
/ `grep`) with pure Python using `pathlib.rglob` + `read_text`. This is:
- **Cross-platform** - works identically on Windows and Linux
- **Simpler** - no shell escaping, regex parsing, or platform branching
- **Reliable** - no dependency on shell output format

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… conflicts (microsoft#10306)

After each release, core packages (e.g. `@typespec/rest@0.81.0`) bump to
new versions before emitter packages (`@typespec/http-client-js@0.14.1`
still peers on `@typespec/rest@^0.80.0`). The e2e test scaffolds a
project with all deps set to `"latest"` and selects all emitters, so
`npm install` fails with `ERESOLVE` — no `node_modules` or
`package-lock.json` created.

The test then does an exact file list assertion that includes those
install artifacts and fails.

### Changes
- **Remove install artifacts from expected files** in
`create-typespec.test.ts` — `node_modules` and `package-lock.json`
depend on npm registry state and are not what this test validates (the
UI scaffolding flow is)
- **Switch `expectFilesInDir` to subset matching**
(`expect.arrayContaining`) so the assertion passes whether install
succeeds or not, without masking missing scaffolded files
- Fix pre-existing typo: `exected` → `expected` in the touched function

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
…osoft#10294)

Fixes cross-platform compatibility issue introduced in microsoft#10234.

### Problem

The \.slnx\ solution files generated by \NewProjectScaffolding\ used
backslashes (\src\Package.csproj\) which is Windows-specific and may not
resolve correctly on Linux/macOS.

### Changes

- **\NewProjectScaffolding.cs\**: Changed \src\{0}.csproj\ to
\src/{0}.csproj\ in \GetSolutionFileContent()\
- **Test projects**: Updated all 72 generated \.slnx\ files to use
forward slashes
- **\NewProjectScaffoldingTests.cs\**: Added test
\Execute_SlnxUsesForwardSlashes\ to verify forward slashes are used in
the generated content

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…icrosoft#10302)

## Summary

Enable previously skipped Python SDK mock API tests and update them to
match the current generated SDK API surface.

## Changes

### Client structure tests (8 tests: 4 sync + 4 async)
- Removed `@pytest.mark.skip` decorator — the TCGC version requirement
(≥ 0.67.0) is now met
- Updated test code to match the new SDK API surface where operations
are now accessed through operation groups:
- `RenamedOperationClient`: `client.renamed_two()` →
`client.group.renamed_two()` (and similar for `renamed_four`,
`renamed_six`)
- `TwoOperationGroupClient`: `client.one()` → `client.group1.one()`,
`client.two()` → `client.group2.two()` (etc.)
- `FirstClient`: `client.two()` → `client.group3.two()`, `client.four()`
→ `client.group4.four()` (etc.)
  - `SecondClient`: `client.six()` → `client.group5.six()`
- Cleaned up unused `import pytest` statements

### Spread record discriminated union tests (2 tests: 1 sync + 1 async)
- Removed `test_spread_record_discriminated_union` test functions
entirely since the Spector scenario
(`SpreadRecordForDiscriminatedUnion`) was removed from
`@typespec/http-specs` per [PR
microsoft#6425](microsoft#6425)

### Discriminated union tests (unchanged)
- These remain skipped (`@pytest.mark.skip`) as the Python SDK generator
doesn't yet support discriminated union serialization/deserialization

## Validation
- All client structure tests (12 total: sync + async) pass locally
against the Spector mock server
- All additional properties tests (62 total) pass after removing the
obsolete test

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
…ctor (microsoft#10301)

Updates the python-sdk-spector-mock-api-tests SKILL.md to reflect the
test framework refactor in packages/http-client-python.

### Changes:

- **Directory paths**: Updated all paths from
generator/test/{flavor}/mock_api_tests/ to
tests/mock_api/{azure,unbranded,shared}/
- **Generic to Shared**: Renamed references from generic_mock_api_tests
to mock_api/shared
- **Generated packages**: Updated path from
generator/test/{flavor}/generated/ to tests/generated/{flavor}/
- **Requirements**: Updated from per-flavor requirements.txt to
centralized tests/requirements/{base,azure,unbranded}.txt
- **Regenerate CLI**: Added --flavor flag documentation alongside --name
- **Format command**: Updated from black -l 120 to black --config
./eng/scripts/ci/config/pyproject.toml
- **Test validation**: Replaced tox-based flow with direct two-terminal
approach (manual spector server + pytest)
- **Removed unnecessary env vars step**: PYTHONPATH and FLAVOR are not
needed for mock API tests
- **Added guidance**: Clarified when full test suite is needed (emitter
source changes) vs single test (test-only changes)
…-csharp (microsoft#10315)

## Problem

When running the C# emitter with no options (specifically no
`package-name`), the C# generator crashes with an
`InvalidOperationException` instead of reporting a diagnostic or using a
default.

## Changes

### C# Generator
- **`Configuration.cs`**: Made `package-name` optional with a
`DefaultPackageName` fallback (`"GeneratedClient"`). Removed
`ReadRequiredStringOption` since no options are required anymore.
- **`CodeModelGenerator.cs`**: In `Configure()`, resolves the default
from `PrimaryNamespace` (code model namespace) and emits an info message
— per [Josh's
suggestion](microsoft#9554 (comment)).

### TypeScript Emitter
- **`emitter.ts`**: Generator failures now report diagnostics via
`sdkContext.logger.error()` instead of throwing unhandled exceptions.

### Tests
- Updated `ConfigurationTests.cs`: verify default package name behavior
and PrimaryNamespace resolution.
- Added emitter test: verify generator failure reports diagnostic
without crashing.

Fixes microsoft#9554

---
:robot: Created with JonathanCrd copilot

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updates Node.js dependencies for `http-client-java` to latest and
patches two vite security vulnerabilities (arbitrary file read via dev
server WebSocket and `server.fs.deny` bypass via query strings) present
across the monorepo.

## http-client-java dependency updates
- `@azure-tools/typespec-client-generator-core`: `0.67.0` → `0.67.1`
- `@microsoft/api-extractor`: `^7.58.1` → `^7.58.2`
- `@microsoft/api-extractor-model`: `^7.33.5` → `^7.33.6`
- Updated `overrides` in both test `package.json` files and regenerated
`package-lock.json`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
## Description

Fix import generation when using a generation subdirectory
(generation-subdir). This ensures imports are correctly resolved for
generated code in subdirectories.

## Changes

- Fix import resolution in
`generator/pygen/codegen/serializers/__init__.py`
- Update `regenerate-common.ts` script
- Add test cases for generation-subdir scenarios

## Changelog
```
changeKind: fix
packages:
  - @typespec/http-client-python
```

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nario (microsoft#10258)

Adds Python SDK mock API tests for the
[`service/multiple-services`](Azure/typespec-azure#4158)
Spector scenario, which tests that multiple services defined without an
explicit `@client` decorator generate separate root clients.

## Changes

- **`regenerate-common.ts`**: Added `service/multiple-services` entry
with namespace `service.multipleservices`
- **New tests** (`test_service_multiple_services.py` + async
counterpart): Validates that both `ServiceAClient` and `ServiceBClient`
are generated as separate root clients, and verifies
`ServiceBClient.operations.op_b()` and
`ServiceBClient.sub_namespace.sub_op_b()` — correct `api-version=bv2`
succeeds (204), wrong `api-version=bv1` raises `HttpResponseError`
- **Changelog entry**: Added internal changelog for
`@typespec/http-client-python`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
microsoft#10316)

…t Generated

The ConfigurationSchema.json was being written to a new Generated folder
at the project root level, but it should go under the existing
src/Generated folder where all other generated artifacts reside.

- ScmCodeModelGenerator.cs: output path changed to src/Generated/schema/
- NewProjectScaffolding.cs: csproj pack include updated to
Generated\schema\ (relative to src/ where csproj lives)
- All 72 test projects regenerated with corrected paths

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes microsoft#10169 

- Bundle and upload Python emitter, peer deps, and wheel file to Azure
Storage Blob for playground consumption
- update the Python emitter to create a browser-compatible Pyodide
codepath which loads the python libraries from storage blob, and display
it in the playground
…od signature (microsoft#10326)

fixes microsoft#10247

Co-authored-by: iscai-msft <isabellavcai@gmail.com>
Node 20 EOL is at the end april, which means next Typespec release will
drop support.
We already have plenty of our dependencies that have dropped early and
upgrading will allow us to use some nice built-in
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radhgupta radhgupta closed this Apr 14, 2026
@github-actions
Copy link
Copy Markdown

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/emitter-framework
  • @typespec/http-canonicalization
  • @typespec/http-client-js
  • @typespec/http-client
  • @typespec/http-server-js
  • @typespec/mutator-framework
  • @typespec/prettier-plugin-typespec
  • @typespec/protobuf

The following packages have already been documented:

  • @typespec/asset-emitter
  • @typespec/bundler
  • @typespec/compiler
  • @typespec/eslint-plugin
  • @typespec/events
  • @typespec/html-program-viewer
  • @typespec/http-client-java
  • @typespec/http-client-python
  • @typespec/http-server-csharp
  • @typespec/http-specs
  • @typespec/http
  • @typespec/internal-build-utils
  • @typespec/json-schema
  • @typespec/library-linter
  • @typespec/openapi
  • @typespec/openapi3
  • @typespec/playground
  • @typespec/rest
  • @typespec/spec-api
  • @typespec/spec-coverage-sdk
  • @typespec/spector
  • @typespec/sse
  • @typespec/streams
  • tmlanguage-generator
  • @typespec/tspd
  • typespec-vs
  • typespec-vscode
  • @typespec/versioning
  • @typespec/xml
Show changes

@typespec/http-client-java - fix ✏️

Use LinkedHashMap and LinkedHashSet to ensure consistent iterating order.

@typespec/http-client-java - internal ✏️

Add e2e test for ServerDrivenPagination alternate initial verb (POST) scenario in clientcore tests

@typespec/http-client-java - internal ✏️

add e2e tests for azure.resourcemanager.methodsubscriptionid.operations and azure.resourcemanager.nonresource.nonresourceoperations.create

@typespec/http-client-java - internal ✏️

Add missing tests for int32SecondsLargerUnit and floatSecondsLargerUnit encode/duration scenarios (query, header, and property).

@typespec/http-client-java - feature ✏️

Support DurationKnownEncoding.milliseconds in http-client-java. Duration properties encoded as milliseconds now use Duration as the client type, with proper conversion to/from integer or float milliseconds on the wire.

@typespec/http-client-java - dependencies ✏️

Update dependencies: @azure-tools/typespec-client-generator-core 0.66.1→0.66.2, @azure-tools/typespec-azure-rulesets 0.65.1→0.66.0, @typespec/http-specs 0.1.0-alpha.33→0.1.0-alpha.34

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies

@typespec/http-client-java - dependencies ✏️

Update Node.js dependencies

@typespec/http-client-java - dependencies ✏️

Update @azure-tools/typespec-client-generator-core to 0.67.1 and other dev dependencies to latest

@typespec/http-client-python - internal ✏️

Enable previously skipped client structure and client operation group mock API tests after TCGC 0.67.0 upgrade; remove obsolete test_spread_record_discriminated_union tests whose Spector scenario was removed.

@typespec/http-client-python - fix ✏️

fix import for _validation.py/_types.py when "generation-subdir" is configured

@typespec/http-client-python - internal ✏️

Fix test_sensitive_word failing on Windows by replacing shell-based search with pure Python pathlib implementation.

@typespec/http-client-java - fix ✏️

Fix bug on alternateType apply to enum/union.

@typespec/http-client-java - dependencies ✏️

Update Node dependencies

@typespec/http-client-java - fix ✏️

access=public should override Paged

@typespec/http-client-java - internal ✏️

Add e2e tests for client-initialization scenarios

@typespec/http-client-java - fix ✏️

Fix result segments like "value" not found if defined in parent model.

@typespec/http-client-java - fix ✏️

Ignore error in JSON example, if the format is incorrect.

@typespec/http-client-java - fix ✏️

Improve handling of plural to singular convert.

@typespec/http-client-java - dependencies ✏️

Update dependencies: @azure-tools/typespec-client-generator-core 0.65.4, @typespec/http 1.9.1, @microsoft/api-extractor ^7.57.6, @microsoft/api-extractor-model ^7.33.4, @types/node ~25.3.5, c8 ~11.0.0

@typespec/http-client-java - feature ✏️

Support apiVersions in metadata.json file.

@typespec/http-client-java - dependencies ✏️

Update compiler to 1.10.0

@typespec/http-client-java - fix ✏️

Allow text/plain content-type on Enum

@typespec/http-client-java - feature ✏️

Add a warning when emitter does not spread for json-merge-patch payload.

@typespec/http-client-java - fix ✏️

Fix bug on XML array with isXmlWrapper=true

@typespec/http-client-java - fix ✏️

Fix discriminator property not generated when model has @Discriminator but no known subtypes

@typespec/http-client-java - fix ✏️

mgmt, use separate entry points for premium samples

@typespec/http-client-java - internal ✏️

Update internal npm feed from azure-sdk-for-js-test-autorest to azure-sdk-for-js

@typespec/asset-emitter - internal ✏️

Upgrade minimum node version to 22

@typespec/bundler - internal ✏️

Upgrade minimum node version to 22

@typespec/compiler - internal ✏️

Upgrade minimum node version to 22

@typespec/eslint-plugin - internal ✏️

Upgrade minimum node version to 22

@typespec/events - internal ✏️

Upgrade minimum node version to 22

@typespec/html-program-viewer - internal ✏️

Upgrade minimum node version to 22

@typespec/http-server-csharp - internal ✏️

Upgrade minimum node version to 22

@typespec/http-specs - internal ✏️

Upgrade minimum node version to 22

@typespec/http - internal ✏️

Upgrade minimum node version to 22

@typespec/internal-build-utils - internal ✏️

Upgrade minimum node version to 22

@typespec/json-schema - internal ✏️

Upgrade minimum node version to 22

@typespec/library-linter - internal ✏️

Upgrade minimum node version to 22

@typespec/openapi - internal ✏️

Upgrade minimum node version to 22

@typespec/openapi3 - internal ✏️

Upgrade minimum node version to 22

@typespec/playground - internal ✏️

Upgrade minimum node version to 22

@typespec/rest - internal ✏️

Upgrade minimum node version to 22

@typespec/spec-api - internal ✏️

Upgrade minimum node version to 22

@typespec/spec-coverage-sdk - internal ✏️

Upgrade minimum node version to 22

@typespec/spector - internal ✏️

Upgrade minimum node version to 22

@typespec/sse - internal ✏️

Upgrade minimum node version to 22

@typespec/streams - internal ✏️

Upgrade minimum node version to 22

tmlanguage-generator - internal ✏️

Upgrade minimum node version to 22

@typespec/tspd - internal ✏️

Upgrade minimum node version to 22

typespec-vs - internal ✏️

Upgrade minimum node version to 22

typespec-vscode - internal ✏️

Upgrade minimum node version to 22

@typespec/versioning - internal ✏️

Upgrade minimum node version to 22

@typespec/xml - internal ✏️

Upgrade minimum node version to 22

@typespec/http-client-python - internal ✏️

Extend publish pipeline to upload emitter bundles to Playground storage account. Update Python emitter to be browser-compatible for use in the TypeSpec playground.

@typespec/bundle-uploader - internal ✏️

Extend publish pipeline to upload emitter bundles to Playground storage account. Update Python emitter to be browser-compatible for use in the TypeSpec playground.

@typespec/http-client-python - internal ✏️

Add mock API tests for service/multiple-services scenario (multiple services without explicit @client).

@typespec/http-client-python - fix ✏️

Fix padding of keys in splatted body parameter method signature

@typespec/spec-dashboard - internal ✏️

Add coverage overview component and emitter display name support

@typespec/http-client-java - internal ✏️

Upgrade to eslint 10

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.