root-client-missing-service
@azure-tools/typespec-client-generator-core/root-client-missing-serviceSeverity: error
This diagnostic is issued when a root namespace decorated with @client does not specify a service configuration.
Impact
Section titled “Impact”- Area: Root client construction. Blocks building an explicit root client because TCGC cannot determine which service metadata it represents.
- Not affected: The service namespace itself remains valid.
❌ Incorrect Usage
Section titled “❌ Incorrect Usage”@client // root client is missing `{ service: ... }`namespace WidgetClient {
}Diagnostic Message
Section titled “Diagnostic Message”TCGC reports:
Root namespace decorated with @client must have service config.✅ How to Fix
Section titled “✅ How to Fix”Add the service option to the root @client, or make the client nested under a parent client whose services it should inherit:
@servicenamespace WidgetService;
@client({ service: WidgetService,})namespace WidgetClient {
}