Skip to content

Commit

Permalink
fix(cli): set serviceResponse default value to body (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
seriouslag authored Apr 30, 2024
1 parent d82b34e commit afda2ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Options:
--format <value> Process output folder with formatter? ['biome', 'prettier']
--lint <value> Process output folder with linter? ['eslint', 'biome']
--operationId Use operation ID to generate operation names?
--serviceResponse <value> Define shape of returned value from service calls ['body', 'response']
--serviceResponse <value> Define shape of returned value from service calls ['body', 'response'] (default: "body")
--base <value> Manually set base in OpenAPI config instead of inferring from server value
--enums <value> Generate JavaScript objects from enum definitions? ['javascript', 'typescript']
--useDateType Use Date type instead of string for date types for models, this will not convert the data to a Date object
Expand Down
4 changes: 3 additions & 1 deletion src/cli.mts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ async function setupProgram() {
new Option(
"--serviceResponse <value>",
"Define shape of returned value from service calls"
).choices(["body", "response"])
)
.choices(["body", "response"])
.default("body")
)
.option(
"--base <value>",
Expand Down

0 comments on commit afda2ac

Please sign in to comment.