Skip to content

Commit 4380f8f

Browse files
authored
feature(cli): add useUnionTypes option (#16)
1 parent 7fdae77 commit 4380f8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Options } from "openapi-typescript-codegen";
77
export type CLIOptions = {
88
output?: string;
99
client?: Options["httpClient"];
10-
} & Pick<Options, 'exportSchemas' | 'postfix' | 'request' | 'indent' | 'input'>;
10+
} & Pick<Options, 'exportSchemas' | 'postfix' | 'request' | 'indent' | 'input' | 'useUnionTypes'>;
1111

1212
const program = new Command();
1313

@@ -25,6 +25,7 @@ program
2525
"HTTP client to generate [fetch, xhr, node, axios, angular]",
2626
"fetch"
2727
)
28+
.option("--useUnionTypes", "Use union types", false)
2829
.option("--exportSchemas <value>", "Write schemas to disk", false)
2930
.option("--indent <value>", "Indentation options [4, 2, tabs]", "4")
3031
.option("--postfix <value>", "Service name postfix", "Service")

0 commit comments

Comments
 (0)