Skip to content

Conversation

@tadelesh
Copy link
Member

No description provided.

timotheeguerin and others added 12 commits December 15, 2025 12:42
fix #3658

3 fixes:
- Drop extra `items` when type changed to `string`
- Generate correct type when using supported array encoding which map to
collectionFormat on parmaeters
- Don't error when using commaDelimited on parameters
Co-authored-by: tadelesh <[email protected]>
Co-authored-by: iscai-msft <[email protected]>
Co-authored-by: Chenjie Shi <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: iscai-msft <[email protected]>
Co-authored-by: tadelesh <[email protected]>
Co-authored-by: Chenjie Shi <[email protected]>
- [x] Analyze comments and understand requested changes
- [x] Revert package.json changes (onlyBuiltDependencies additions not
needed)
- [x] Fix property comparison logic to handle envelopes correctly
- [x] Verify fix doesn't break Dog/Pet discriminator case
- [x] Address CI failure from azure-http-specs
- [x] Reply to comments with fix details
- [x] Fix test case to ensure models are found in SDK package
- [x] Add changeset for the fix
- [x] Rebase onto release/december-2025 to remove unintended changes
from main

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[TCGC]
Azure.ClientGenerator.Core.Legacy.hierarchyBuilding doesn't recognize
tags envelope properly</issue_title>
> <issue_description>### Context
> 
> We define the models like belowing:
> 
> ``` js
> model FooResource
>   is Azure.ResourceManager.ProxyResource<FooProperties> {
>   ...ResourceNameParameter<
>     Resource = FooResource,
>     KeyName = "fooName",
>     SegmentName = "foos",
>     NamePattern = ""
>   >;
>   ...Azure.ResourceManager.Foundations.ArmTagsProperty;
> 
>   location?: string;
> }
> 
> model FooProperties{
>   /** something */
>   something?: string;
> }
> ```
> 
> For C#, we use the `hierarchyBuilding` decorator to change the base
type of `FooResource` from `ProxyResource` to `TrackedResource`:
> 
> ``` js
> @@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(FooResource,
Azure.ResourceManager.Foundations.TrackedResource, "csharp");
> ```
> 
> ### Issue
> 
> It reports warning: "@hierarchyBuilding decorator causes conflicts in
inherited properties. Please check that the model ApplicationResource
has the same properties as TrackedResource in the spec."
> 
> This happens because the decorator doesn't detect a tags property on
FooResource, but TrackedResource has. Actually in our definition, the
`tags` is provided via the envelope
`Azure.ResourceManager.Foundations.ArmTagsProperty`, and the decorator
currently does not honor the envelope semantics.
> 
> 
> ### Expected Behavior
> 
> The `hierarchyBuilding` decorator should expand any envelopes when
doing property check.</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



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

- Fixes #3686

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

✨ Let Copilot coding agent [set things up for
you](https://github.com/Azure/typespec-azure/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] <[email protected]>
Co-authored-by: ArthurMa1978 <[email protected]>
Co-authored-by: ArcturusZhang <[email protected]>
Co-authored-by: tadelesh <[email protected]>
Co-authored-by: Chenjie Shi <[email protected]>
Co-authored-by: tadelesh <[email protected]>
Fix: #3699

---------

Co-authored-by: tadelesh <[email protected]>
Co-authored-by: tadelesh <[email protected]>
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Dec 26, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 26, 2025

Open in StackBlitz

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

commit: dab211d

@azure-sdk
Copy link
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/typespec-client-generator-core
Show changes

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

@msyyc msyyc added this pull request to the merge queue Dec 27, 2025
Merged via the queue into main with commit a68aa69 Dec 27, 2025
27 checks passed
@msyyc msyyc deleted the backmerge/release/december-2025-2025-12-26 branch December 27, 2025 06:19
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.

7 participants