Options to configure the client generation when using the generator programmatically.

Hierarchy

  • GeneratorOptions

Properties

clearOutputDir?: boolean

Delete EVERYTHING in the specified output directory before generating code.

forceOverwrite?: boolean

Deprecated

Since v2.12.0. Use overwrite instead. Exit when encountering a file that already exists. When set to true, it will be overwritten instead. Please note that compared to the clearOutputDir option, this will not delete outdated files.

generateCSN?: boolean

Deprecated

Since v2.12.0. Generate A CSN file for each service definition in the output directory.

generateJs?: boolean

Generates transpiled .js, .js.map, .d.ts and .d.ts.map files. When set to false, the generator will only generate .ts files.

generateNpmrc?: boolean

Deprecated

Generate a .npmrc file specifying a registry for @sap scoped dependencies.

generatePackageJson?: boolean

Deprecated

Since v2.12.0. Use packageJson instead. Generate a package.json file, specifying dependencies and scripts for compiling and generating documentation.

generateSdkMetadata?: boolean

Hidden option only for internal usage - generate metadata for API hub integration.

include?: string

Include files matching the given glob into the root of each generated client directory.

inputDir: PathLike

This directory will be recursively searched for .edmx/.xml files.

licenseInPackageJson?: string

Deprecated

Since v2.12.0. License name to be used on the generated package.json. Only considered if 'packageJson' is enabled.

outputDir: PathLike

Directory to save the generated code in.

overwrite?: boolean

Exit when encountering a file that already exists. When set to true, it will be overwritten instead. Note, that compared to the clearOutputDir option, this will not delete outdated files.

packageJson?: boolean

Generate a package.json file, specifying dependencies and scripts for compiling and generating documentation.

packageVersion?: string

Deprecated

Since v2.12.0. Internal option used to adjust the version in the generated package.json. Will not be used in the future.

prettierConfig?: PathLike

Specify the path to the prettier config. If not given a default config will be used for the generated sources.

processesJsGeneration?: number

Deprecated

Since v2.12.0. Number of node processes used for transpilation of JavaScript files.

readme?: boolean

Generate default README.md files in the client directories.

s4hanaCloud?: boolean

Deprecated

Since v2.12.0. Internal option used to adjust the description for S/4HANA cloud systems. Will not be used in the future.

sdkAfterVersionScript?: boolean

Deprecated

Since v2.12.0. When set to true, the package.json of generated services will have the after-version script to internally keep the versions in sync.

serviceMapping?: PathLike

Configuration file to ensure consistent names between multiple generation runs with updated / changed metadata files. Will be generated if not existent. Default set to inputDir/service-mapping.json.

transpilationProcesses?: number

Number of node processes used for transpilation of JavaScript files.

useSwagger?: boolean

If set to true, swagger definitions (JSON) are used for generation.

versionInPackageJson?: string

Deprecated

Since v2.12.0. By default, when generating package.json file, the generator will set a version by using the generator version. It can also be set to a specific version.

writeReadme?: boolean

Deprecated

Since v2.12.0. Use readme instead. Generate default README.md files in the client directories.

Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.