Skip to content

empty-name

Id
@azure-tools/typespec-java/empty-name

Severity: error

This diagnostic is issued when TCGC supplies a model without a usable generated name.

Java client generation stops because every emitted Java model requires a class name.

The diagnostic is generally caused by an anonymous or synthesized model shape for which the SDK model did not produce a name. There is no single TypeSpec construct that always triggers it.

Name from TCGC is empty.

Give anonymous request or response shapes an explicit model name and reference that model from the operation.

model WidgetResponse {
value: string;
}
op getWidget(): WidgetResponse;

If all involved models are already named, update the emitter dependencies and report a minimal reproduction.