datamodel-code-generator
datamodel-code-generator copied to clipboard
Add prefix to all generated classes
Hi thanks for the library! It would be great it a user-defined prefix could be added to all generated classes, because my downstream code generators rely on the class name to be unique etc.
This might be more important than it seems.
I have a schema that leads to the following models.
For some reason, whenever both field name and class name match, optional nullable fields get clobbered, and I get a Input should be None whenever I validate valid data.
class Elem(BaseModel):
model_config = ConfigDict(
extra='allow',
)
temp: str
class TestModel(BaseModel):
model_config = ConfigDict(
extra='allow',
)
Elem: List[Elem] | None = None