Optional
clearRemove all files in the output directory before generation. Be cautious when using this option, as it really removes EVERYTHING in the output directory.
Optional
configSet the path to the file containing the options for generation.
If other flags are used, they overwrite the options set in the configuration file.
If a directory is passed, a config.json
file is read from this directory.
Optional
includeInclude files matching the given glob into the root of each generated client directory.
Specify the path to the directory or file containing the OpenAPI service definition(s) to generate clients for. Accepts Swagger and OpenAPI definitions as YAML and JSON files. Throws an error if the path does not exist.
Optional
licenseSince v2.13.0. Use the include
option to add a custom package.json.
License name to be used on the generated package.json
. Only considered if 'packageJson' is enabled.
Optional
metadataHidden option only for internal usage - generate metadata for API hub integration.
Optional
optionsSet the path to a file containing the options per service.
The configuration allows to set a directoryName
and packageName
for every service, identified by the path to the original file.
It also makes sure that names do not change between generator runs.
If a directory is passed, a options-per-service.json
file is read/created in this directory.
Specify the path to the directory to generate the client(s) in.
Each client is generated into a subdirectory within the given output directory.
Creates the directory if it does not exist.
Customize subdirectory naming through optionsPerService
.
Optional
overwriteAllow overwriting files that already exist. This is useful when running the generation regularly.
Optional
packageWhen enabled, a package.json
containing dependencies and scripts for transpilation and documentation generation, is generated.
Optional
packageSince v2.13.0. Use the include
option to add a custom package.json.
Internal option used to adjust the version in the generated package.json. Will not be used in the future.
Optional
prettierSpecify the path to the prettier config. If not given a default config will be used for the generated sources.
Optional
readmeGenerate default README.md
files in the client directories.
Optional
skipBy default, the generation fails when there are duplicate or invalid names for operations and/or path parameters after transforming them to camel case. Set this to true to enable unique and valid name generation. The names will then be generated by appending numbers and prepending prefixes.
Optional
transpileTranspile the generated TypeScript code.
When enabled, a default tsconfig.json
will be generated and used.
It emits .js
, .js.map
, .d.ts
and .d.ts.map
files.
To configure transpilation set tsconfig
.
Optional
tsReplace the default tsconfig.json
by passing a path to a custom configuration.
By default, a tsconfig.json
is only generated when transpilation is enabled (transpile
).
If a directory is passed, a tsconfig.json
file is read from this directory.
Optional
verboseTurn on verbose logging.
Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.
Options that can be used to configure the generation when using the generator programmatically. The options match the CLI options.