From afda2ac2ac7d8f4afe647e39726522309d509229 Mon Sep 17 00:00:00 2001 From: Landon Gavin Date: Tue, 30 Apr 2024 18:35:32 -0400 Subject: [PATCH] fix(cli): set serviceResponse default value to body (#98) --- README.md | 2 +- src/cli.mts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5721e7b..52ff462 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Options: --format Process output folder with formatter? ['biome', 'prettier'] --lint Process output folder with linter? ['eslint', 'biome'] --operationId Use operation ID to generate operation names? - --serviceResponse Define shape of returned value from service calls ['body', 'response'] + --serviceResponse Define shape of returned value from service calls ['body', 'response'] (default: "body") --base Manually set base in OpenAPI config instead of inferring from server value --enums 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 diff --git a/src/cli.mts b/src/cli.mts index d7c808f..9120cce 100644 --- a/src/cli.mts +++ b/src/cli.mts @@ -64,7 +64,9 @@ async function setupProgram() { new Option( "--serviceResponse ", "Define shape of returned value from service calls" - ).choices(["body", "response"]) + ) + .choices(["body", "response"]) + .default("body") ) .option( "--base ",