override-response-replacement
@azure-tools/typespec-client-generator-core/override-response-replacementSeverity: warning
This diagnostic is issued when an @override operation intentionally replaces the original response type with void or bytes through replaceResponseWithVoid or replaceResponseWithBytes.
Impact
Section titled “Impact”- Area: Client method override signatures. Generation continues, but the generated client method no longer surfaces the original modeled response type.
- Not affected: The service still declares its original wire response, and the HTTP response metadata is preserved.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”This is not an error, but the warning highlights that the method response type was replaced:
@servicenamespace MyService { @post op delete(): DeleteResult;}
alias DeleteResponse = replaceResponseWithVoid(MyService.delete);@@override(MyService.delete, DeleteResponse);Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Method "delete" has an intentional response replacement in the override operation. Suppress this warning if the replacement is expected.✅ How to Fix
Section titled “✅ How to Fix”If the replacement is intentional, suppress the warning to acknowledge that the method response type was deliberately replaced.
Suppression
Section titled “Suppression”Suppress this warning when the response replacement is expected.
#suppress "@azure-tools/typespec-client-generator-core/override-response-replacement" "intentionally returning void to SDK consumers"alias DeleteResponse = replaceResponseWithVoid(MyService.delete);@@override(MyService.delete, DeleteResponse);