Skip to content

Commit

Permalink
allow emitter run without service
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Dec 17, 2024
1 parent 97a9afe commit c2c21b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/http-client-java/emitter/src/code-model-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ export class CodeModelBuilder {
}

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

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

Expand Down

0 comments on commit c2c21b9

Please sign in to comment.