Skip to content

empty-client-namespace

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

Severity: warning

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

  • Area: SDK namespace customization. Generation continues, but the empty @clientNamespace override cannot place generated declarations in a custom namespace.
  • Not affected: Model names, operation routes, and payload serialization are unchanged.
@clientNamespace(" ") // client namespace is empty/whitespace
model Widget {}

TCGC reports:

Cannot pass an empty value to the @clientNamespace decorator

Provide a non-empty namespace string or remove @clientNamespace.

@clientNamespace("Contoso.Widgets")
model Widget {}

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