-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Is your feature request related to a problem? Please describe.
At instacart we are power users of openapi-generator. We have thousands of files in the /models directory.
Because of the barrel imports, importing one file from models or apis imports everything from models or apis.
EG
import {
GetAdminProductMappingRequestsParamData,
GetAdminProductMappingRequestsParamDataFromJSON,
GetAdminProductMappingRequestsParamDataFromJSONTyped,
} from './' // This imports the index.ts file, which imports than exports everything (AKA barrel import)Parsing all that typescript causes our tests to run significantly slower. We've experimented with manually removing the barrel imports. Which resulted in a ~3x speedup. Individual test ran in 12s rather than 33s.
Describe the solution you'd like
I'd like to add a --noBarrelImports flag to the generator
Describe alternatives you've considered
We tried creating our own .mustache templates. And it worked! It'd be nice to it have built in, so we can continue to get updates and bug fixes.
jumika