Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/content/docs/guides/cli-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ The available options are:
- `biome`
- `eslint`

### --operationId
### --noOperationId

Use operation ID to generate operation names? The default value is `true`.
Do not use operation ID to generate operation names. The default value is `true`.

### --enums \<value\>

Expand Down
7 changes: 5 additions & 2 deletions src/cli.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type LimitedUserConfig = {
client?: "@hey-api/client-fetch" | "@hey-api/client-axios";
format?: "biome" | "prettier";
lint?: "biome" | "eslint";
operationId?: boolean;
noOperationId?: boolean;
enums?: "javascript" | "typescript" | false;
useDateType?: boolean;
debug?: boolean;
Expand Down Expand Up @@ -58,7 +58,10 @@ async function setupProgram() {
"Process output folder with linter?",
).choices(["biome", "eslint"]),
)
.option("--operationId", "Use operation ID to generate operation names?")
.option(
"--noOperationId",
"Do not use operationId to generate operation names",
)
.addOption(
new Option(
"--enums <value>",
Expand Down
5 changes: 1 addition & 4 deletions src/generate.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ export async function generate(options: LimitedUserConfig, version: string) {
services: {
export: true,
asClass: false,
operationId:
formattedOptions.operationId !== undefined
? formattedOptions.operationId
: true,
operationId: !formattedOptions.noOperationId,
},
types: {
dates: formattedOptions.useDateType,
Expand Down