Skip to content

Commit

Permalink
log a warning, and avoid azure
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Dec 17, 2024
1 parent c2c21b9 commit cdfe123
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/http-client-java/emitter/src/code-model-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,12 @@ export class CodeModelBuilder {
}

const service = listServices(this.program)[0];
if (!service) {
this.logWarning("TypeSpec for HTTP client should define a service.");
}
this.serviceNamespace = service?.type ?? this.program.getGlobalNamespaceType();

this.namespace = getNamespaceFullName(this.serviceNamespace) || "Azure.Client";
this.namespace = getNamespaceFullName(this.serviceNamespace) || "Client";

const namespace1 = this.namespace;
this.typeNameOptions = {
Expand Down

0 comments on commit cdfe123

Please sign in to comment.