Skip to content

empty-client-name

Id
@azure-tools/typespec-client-generator-core/empty-client-name

Severity: warning

This diagnostic is issued when @clientName is given an empty or whitespace-only value.

  • Area: SDK naming customization. Generation continues, but the empty @clientName override is ignored and the default generated name is used.
  • Not affected: The target declaration’s TypeSpec name and wire representation are unchanged.
@clientName(" ") // client name is empty/whitespace
model Widget {}

TCGC reports:

Cannot pass an empty value to the @clientName decorator

Provide a non-empty name to @clientName or remove the decorator.

@clientName("WidgetClient")
model Widget {}

This diagnostic should not be suppressed. Give @clientName a non-empty name, or remove the decorator.