Is your feature request related to a problem? Please describe.
I'd like a feature in datamodel-codegen that eliminates redundancy in model naming, allowing for the merging of schema and model class references into a single name to simplify generated code.
Describe the solution you'd like
when I do --reuse-model it would be nice to have the option to merge the naming / reference into a single one. i.e. currently I might have something like
class BoundingRegionSchema(BaseModel):
...etc
class BoundingRegion(BoundingRegionSchema):
pass
But this makes for more confusing relationships, is there a way to collapse these references into BoundingRegionSchema?
Describe alternatives you've considered
An alternative I've thought about but not yet implemented involves performing a manual or programmatic analysis of the output. The idea is to identify classes that only contain "pass" as their content, then replace all references to these classes with their corresponding parent classes.
Additional context
This is born from #1418
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