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
Describe the bug
Using extend_schema wrapper, limits me to only use this wrapper in my final API, class, for example if I have 100 APIs I can not just create a abstract class which does this:
class BaseAPI(
mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView):
This won't work and I am forced to use extend schema in all of my API class methods across all these 100 APIs, which is against Django DRY and it seems much more code than it really needs.
As I am not very professional python programmer I have used many solutions which I have found in internet to over come this issue, for example overriding new function and none works, so I was thinking is there anyway to extend schema of a function without using a wrapper? so I can add an abstraction class???
The text was updated successfully, but these errors were encountered:
Describe the bug
Using extend_schema wrapper, limits me to only use this wrapper in my final API, class, for example if I have 100 APIs I can not just create a abstract class which does this:
class BaseAPI(
mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView):
This won't work and I am forced to use extend schema in all of my API class methods across all these 100 APIs, which is against Django DRY and it seems much more code than it really needs.
As I am not very professional python programmer I have used many solutions which I have found in internet to over come this issue, for example overriding new function and none works, so I was thinking is there anyway to extend schema of a function without using a wrapper? so I can add an abstraction class???
The text was updated successfully, but these errors were encountered: