Is your feature request related to a problem? Please describe.
Because Pydantic2 broke... everything, my org still uses Pydantic 1 until everything can be refactored. Because Pydantic 2 had all the breaking changes, they left the legacy package in the new "pydantic.v1" package inside the current deploy to allow for more piecemeal migrations rather than "all-or-nothing." So, I can change all my imports from "from pydantic.xxx" to "from pydantic.v1.xxx" and they will work without breaking even if I pull in the 2.x Pydantic library, allowing me to slowly migrate as I can.
However, that change in import statement is not captured in my generated models from DMCG, so they fail imports for classes like the field types at runtime.
Describe the solution you'd like
A new command line option "-add-v1-to-imports" that literally just changes "from pydantic" to "from pydantic.v1" in generated models for backward compatibility.
Describe alternatives you've considered
I considered writing a manual post-processor for generated files.
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