diff --git a/packages/cli-generate-http-client/src/commands/GenerateHttpClientCmd.ts b/packages/cli-generate-http-client/src/commands/GenerateHttpClientCmd.ts index 1cc7d5f99..2a6ac75c1 100644 --- a/packages/cli-generate-http-client/src/commands/GenerateHttpClientCmd.ts +++ b/packages/cli-generate-http-client/src/commands/GenerateHttpClientCmd.ts @@ -114,7 +114,7 @@ export class GenerateHttpClientCmd implements CommandProvider { } private async generateFromSpec(spec: any, conf: any, $ctx: GenerateHttpClientCtx) { - const operationIdMode = conf.operationId === "%c_%m" ? "underscore" : "default"; + const operationIdMode = !conf.operationId || conf.operationId === "%c_%m" ? "underscore" : "default"; const {files} = await generateApi({ name: `${$ctx.name}.ts`,