Skip to content

[tcgc] add functions to help with override story#3995

Open
iscai-msft wants to merge 10 commits intoAzure:mainfrom
iscai-msft:tcgc/addReplaceDecorator
Open

[tcgc] add functions to help with override story#3995
iscai-msft wants to merge 10 commits intoAzure:mainfrom
iscai-msft:tcgc/addReplaceDecorator

Conversation

@iscai-msft
Copy link
Contributor

No description provided.

iscai-msft and others added 5 commits March 2, 2026 15:53
…arate file

- Move replaceParameter from decorators.tsp to new lib/functions.tsp
- Add replaceResponse function to replace operation return types
- Add addParameter function to add parameters to operations
- Add tests for all three functions (23 total tests)
- Add documentation page for functions (experimental)
- Update reference index to link to functions documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Mar 2, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

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

commit: f7f263c

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 2, 2026

All changed packages have been documented.

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

@azure-tools/typespec-client-generator-core - feature ✏️

Add experimental extern functions for operation transformations:,> - replaceParameter: Replace or remove a parameter in an operation,> - replaceResponse: Replace the return type of an operation,> - addParameter: Add a new parameter to an operation,> ,> These functions enable composable transformations that work with @@override to customize method signatures in client SDKs.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Mar 2, 2026

You can try these changes here

🛝 Playground 🌐 Website

iscai-msft and others added 4 commits March 2, 2026 17:19
- Use createClientCustomizationInput and createSdkContextForTester pattern
- Verify method parameters, optionality, types
- Verify operation-to-method parameter mappings (correspondingMethodParams)
- Test scoped overrides (Python vs C#)
- Remove complex nested namespace tests that hit TCGC edge cases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove functions.md from tcgc reference section
- Add comprehensive @OverRide section to 04method.mdx
- Document transformation functions (replaceParameter, addParameter, replaceResponse)
- Add multi-language examples with ClientTabs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the meta:website TypeSpec.io updates label Mar 17, 2026
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 meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants