Backmerge/release/january 2026 2026 01 14#3773
Merged
Conversation
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>
commit: |
Collaborator
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
Collaborator
|
You can try these changes here
|
weidongxu-microsoft
approved these changes
Jan 15, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.