You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Yes, I want to be able to specify different base classes for my generated models.
Describe the solution you'd like
We can specify the base class for all models using --base-class. For example, if my package is like this
my_package/base_classes.py
pyproject.toml
Then I can specify them as --base-class=my_package.base_classes.MyBaseClass, but this applies to all models, which is clearly undesirable. Ideally, we should be able to specify the base class for each model that is generated.
For example, we could have the flag --base-classes=base_classes.json, then base_classes.json would look like
The alternative could be to override the template and specify the base model depending on the name of the class, but the problem is that we can't import the base class in that way. The template only applies to a single model not the full module or Python file.
We could define the base class in the template, but this is really not ideal, because we want to reuse.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Yes, I want to be able to specify different base classes for my generated models.
Describe the solution you'd like
We can specify the base class for all models using
--base-class
. For example, if my package is like thisThen I can specify them as
--base-class=my_package.base_classes.MyBaseClass
, but this applies to all models, which is clearly undesirable. Ideally, we should be able to specify the base class for each model that is generated.For example, we could have the flag
--base-classes=base_classes.json
, thenbase_classes.json
would look likeOr something like that
Describe alternatives you've considered
The alternative could be to override the template and specify the base model depending on the name of the class, but the problem is that we can't import the base class in that way. The template only applies to a single model not the full module or Python file.
We could define the base class in the template, but this is really not ideal, because we want to reuse.
The text was updated successfully, but these errors were encountered: