Is your feature request related to a problem? Please describe.
Our FastAPI startup time is slow due to initializing Pydantic models. A lot of this initialization time is in models that we do not use. Our datamodel-code-generator
generated models contain many models which our code does not use.
Describe the solution you'd like
Rather than output a single file containing all models, we would like to generate a directory of files, so that we can only import the models we need.
Describe alternatives you've considered
We've thought about adding a subsequent model-stripping step on our side, but it would be better to not have to maintain this code.
Additional context
n/a
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too