microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
Commit
fix: generate parameterized accessor for subclients with subclient-specific parameters (#9919)
- [x] Fix `ClientProvider.cs`: `HasAccessorOnlyParameters()` detects
subclient-specific params; `BuildFields()` skips caching field;
`BuildMethods()` generates parameterized accessor
- [x] Add unit tests for Parent-only subclients with accessor-only
parameters
- [x] Add `MetricsClientParams` to `SampleService/main.tsp`; regenerate
`Sample-TypeSpec`
- [x] Revert Spector azure test project changes
- [x] Run prettier on `SampleService/main.tsp`
- [x] Run `Generate.ps1` and check in regenerated files
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Subclient parameters need to be included in
accessors</issue_title>
> <issue_description>For subclients that can be created individually or
from the parent, the subclient parameters are not included in the
subclient accessors currently. </issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes microsoft/typespec#9775
<!-- 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: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: jolov <jolov@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>Changed files
10 files listed