swagger-typescript-api
swagger-typescript-api copied to clipboard
Generate an index file when using modular mode
I want to use Modular mode, but it doesn't generate an index file to mass-export stuff.
Rather than being able to do import { Thing, ThingDto } from 'api';, I'm forced to use multiple import statements, import { Thing } from 'api/Thing'; import { ThingDto } from 'api/data-contracts';
Is it possible to have this generate an index.ts file? If not a cli argument, then is it possible to have the modular templates generate a single extra file, such that each module can write to it once?
Thanks.
Also wondering about this.
In node config, you may customize it and share here
fs.appendFileSync(configuration.config.output + "/index.ts", 'export * from "./' + fileName + '";\n');