Instantiates the module writer.
The ts-morph Project instance for AST manipulation.
The target directory where the module file will be written.
The name stem for the module class (e.g., MyCustom becomes MyCustomModule). Defaults to 'Api'.
The OpenAPI specification title for file header metadata.
The OpenAPI specification version for file header metadata.
Generates the NestJS module file and supporting configuration files.
Creates:
${outputDir}/api.module.ts – Dynamic module with forRoot and forRootAsync${outputDir}/api.types.ts – Configuration interfaces and token${outputDir}/api.configuration.ts – ApiConfiguration service${outputDir}/api.utils.ts – Utility functions (toFormData)The Internal Representation containing the list of services to wire.
Promise resolving when all files are written.
Generates the primary NestJS module that wires generated services.
Responsibilities:
forRoot/forRootAsyncsupporting runtime configuration (baseUrl, headers).HttpModulewith axios config derived from provided options.API_CONFIGtoken andApiConfigurationservice for downstream consumers.api.module.tswith class name${moduleName}Module.