Skip to content

Backmerge/release/january 2026 2026 01 14#3773

Merged
tadelesh merged 4 commits intomainfrom
backmerge/release/january-2026-2026-01-14
Jan 15, 2026
Merged

Backmerge/release/january 2026 2026 01 14#3773
tadelesh merged 4 commits intomainfrom
backmerge/release/january-2026-2026-01-14

Conversation

@tadelesh
Copy link
Copy Markdown
Member

No description provided.

tadelesh and others added 4 commits January 14, 2026 15:54
Fix regression for latest release.

---------

Co-authored-by: tadelesh <chenjieshi@microsoft.com>
…3770)

nextLink should be a full URL, which contains api-version parameter

---

tested with Java microsoft/typespec#9370
…I(false) (#3767)

## Summary
Fixed enum types not being included in generated output when
`@convenientAPI(false)` is used with HTTP operation parameters. **Now
based on release/january-2026 branch as requested by @tadelesh.**

### Changes Made
1. **Modified `updateTypesFromOperation` in `types.ts`**: Removed the
`generateConvenient` check for HTTP operation parameters so that types
referenced in these parameters always get Input usage, regardless of the
convenient API setting.

2. **Added comprehensive tests**: Created three test cases in
`convenient-api.test.ts` to verify that enums in query, header, and path
parameters receive Input usage even when `@convenientAPI(false)` is set.

### Root Cause
The bug occurred because TCGC was skipping input usage updates for ALL
parameters when `generateConvenient` was false. However, HTTP operation
parameters (query, header, path) represent the actual protocol-level
parameters that must be included in the generated code.

### Fix Details
- Method parameters - kept the `generateConvenient` check
- HTTP body parameters - kept the `generateConvenient` check  
- HTTP operation parameters - **removed** the `generateConvenient` check
(the fix)

This ensures that types like enums used in HTTP parameters are always
included in the output.

### Branch Update
Rebased changes onto `release/january-2026` as requested.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[TCGC][Bug]: Generated .NET client methods fail to
compile when using @convenientAPI(false) with operation
parameters</issue_title>
> <issue_description>### Describe the bug
> 
> When applying the `@convenientAPI(false)` decorator to operations in
TypeSpec, the generated .NET client fails to compile. The issue occurs
because enum types referenced in operation parameters are not included
in the final tcgc-output.yaml during type collection. the enum is
defined as a type in the parameters, but it is not included in the enums
list. As a result, the generated method signatures reference the enum
type correctly, but the enum definition is missing in the output model.
> 
> 
> ### Reproduction
> 
> [Playground
Link](https://azure.github.io/typespec-azure/playground/?e=%40azure-tools%2Ftypespec-client-generator-core&c=aW1wb3J0ICJAYXp1cmUtdG9vbHMvdHlwZXNwZWMtY2xpZW50LWdlbmVyYXRvci1jb3JlIjsNCsk3yCsvaHR0cMQaDQp1c2luZyBUeXBlU3BlYy5IdHRwO8gWQcRmLkPFV0fIVi5Db3JlxTtAc2VydmljZSgjew0KICB0aXRsZTogIlRlc3QgU8YbIiwNCn0pDQpuYW1lc3BhY2UgxB7HHcVFZW51bSBJbmNsdWRlRcQMxUxgZmlsZV9zZWFyY2hfY2FsbC5yZXN1bHRzYCzFH3dlYtYeINUfYWN0aW9uLnNvdXJjZchEbWVzc2FnZS5pbnB1dF9pbcUMxAZfdXJsxyRjb21wdXRlcsVHX291dHB1dC7HB9IsZGVfaW50ZXJwcmXINMctyHRyZWFzb25pbmcuZW5jcnlwdGVkX2NvbnRlbnTvAJbGOF90ZXh0LmxvZ3Byb2LFRX3kATVtb2RlbCBJdGVtUmXmANXmATdpZDogc3RyaW5nO8QP5AF2yxHFO0Byb3V0ZSgiL2NvbnZlcnNh5AEacy97zA9faWR9L2l0ZW1zL3vEB8QQIikNCkDFJW7kAg9BUEkoZmFsc2UpDQpvcCBnZXRDy0HkAJoo5ACCQHBhdGggz1zoAJPlAPHGIsdmzhpxdWVyeSgje2V4cGxvZGU6IHRydWV9KSBp5gIuPzrsAjhbXSwNCik67QEVOw%3D%3D&options=%7B%7D&vs=%7B%7D)
> 
> IncludeEnum is defined as a type in the parameters, but it is not
included in the enums list
>  
> 
> ### Checklist
> 
> - [x] Follow our [Code of
Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
> - [x] Check that this issue is about the Azure libraries for typespec.
For bug in the typespec language or core libraries file it in the
[TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
> - [x] Check that there isn't already an issue that request the same
bug to avoid creating a duplicate.
> - [x] The provided reproduction is a [minimal reproducible
example](https://stackoverflow.com/help/minimal-reproducible-example) of
the bug.</issue_description>
> 
> <agent_instructions>The fix should base on branch:
release/january-2026.
> The reason is TCGC skip to update input usage for all parameters of
method and underlying operation with `generateConvenient` `false`. The
correct behavior is only skip for HTTP body parameters and method
parameters.</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



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

- Fixes #3574

<!-- 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: tadelesh <1726438+tadelesh@users.noreply.github.com>
Co-authored-by: tadelesh <chenjieshi@microsoft.com>
Co-authored-by: tadelesh <chenjieshi@microsoft.com>
@tadelesh tadelesh enabled auto-merge January 14, 2026 09:34
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Jan 14, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/azure-http-specs@3773
npm i https://pkg.pr.new/Azure/typespec-azure/@azure-tools/typespec-client-generator-core@3773

commit: 200cb26

@azure-sdk
Copy link
Copy Markdown
Collaborator

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

The following packages have changes but are not documented.

  • @azure-tools/azure-http-specs
  • @azure-tools/typespec-client-generator-core
Show changes

@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

@tadelesh tadelesh added this pull request to the merge queue Jan 15, 2026
Merged via the queue into main with commit ccb5aeb Jan 15, 2026
38 checks passed
@tadelesh tadelesh deleted the backmerge/release/january-2026-2026-01-14 branch January 15, 2026 01:04
JoshLove-msft pushed a commit that referenced this pull request Jan 28, 2026
Co-authored-by: tadelesh <chenjieshi@microsoft.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tadelesh <1726438+tadelesh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants