non-head-bool-response-decorator
@azure-tools/typespec-client-generator-core/non-head-bool-response-decoratorSeverity: warning
This diagnostic is issued when @responseAsBool is applied to an operation that is not decorated with @head.
Impact
Section titled “Impact”- Area: HEAD response convenience modeling. Generation continues, but
@responseAsBoolis ignored because the operation is not a HEAD request. - Not affected: The operation’s HTTP verb and response schema are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@responseAsBool@get // `@responseAsBool` requires a HEAD operationop exists(): void;Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
@responseAsBool decorator can only be used on HEAD operations. Will ignore decorator on getOperation.✅ How to Fix
Section titled “✅ How to Fix”Add @head when the operation is a HEAD request, or remove @responseAsBool:
@responseAsBool@headop exists(): void;Suppression
Section titled “Suppression”Suppress this warning only if @responseAsBool is intentionally ignored because the operation is not a HEAD operation for this emitter.
#suppress "@azure-tools/typespec-client-generator-core/non-head-bool-response-decorator" "non-HEAD boolean response is intentional"