client-option
@azure-tools/typespec-client-generator-core/client-optionSeverity: warning
This diagnostic is always issued when @clientOption is used, because client options are a temporary mechanism intended only for language emitters.
Impact
Section titled “Impact”- Area: Targeted language-emitter options. Generation can proceed only with an explicit suppression acknowledging that
@clientOptionis a temporary emitter-specific workaround. - Not affected: The TypeSpec service model and wire protocol are unchanged.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@clientOption("enableFeatureFoo", true, "python") // experimental client option must be suppressedmodel Test { id: string;}Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
@clientOption is experimental and should only be used for temporary workarounds. This usage must be suppressed.✅ How to Fix
Section titled “✅ How to Fix”Double-check whether the client option reflects an intended language-emitter behavior. If it does, suppress this diagnostic; otherwise remove @clientOption.
model Test { id: string;}Suppression
Section titled “Suppression”Because @clientOption is a temporary mechanism for language emitters, this diagnostic should always be suppressed with a justification when the usage is intentional.
#suppress "@azure-tools/typespec-client-generator-core/client-option" "preview feature for python"