Instantiates the index writer.
The ts-morph Project instance for AST manipulation.
The target directory structure where barrels will be written.
The OpenAPI specification title for file header metadata.
The OpenAPI specification version for file header metadata.
Generates all necessary index.ts files for DTOs, services, and the root entrypoint.
The Internal Representation containing models and services.
Promise resolving when all barrel files are written.
Generates barrel export files (
index.ts) for simplified SDK imports.Barrels reduce import path complexity for SDK consumers by re-exporting all models and services from a single entry point per layer (DTOs, Services, root).
Emitted files:
${outputDir}/dto/index.ts– Re-exports all DTO and Enum definitions.${outputDir}/services/index.ts– Re-exports all Service classes.${outputDir}/index.ts– Re-exports DTO and Service barrels.Each barrel includes the standard generated file header with metadata.