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
Hi. I was trying to use drf-yasg to explore api and found it sometimes confusing.
Namely in basket viewset in some methods (create would be easiest example) expected post data is different from class defined serializer hence autodocumentation gives wrong mock request.
Suggestion
rewrite api with aim to strictly use same serializer per viewset. For basket it would mean to always list of variation_id, withoud productvariation inline serializer.
add dedicated annotation with request data for each method. May be with connection to some third party autodocumentation app.
I'm addicted to swagged documentation and willing to apply PR if you are interested in any of such solution. Sorry if I'm missing something.
The text was updated successfully, but these errors were encountered:
Description
Hi. I was trying to use drf-yasg to explore api and found it sometimes confusing.
Namely in basket viewset in some methods (
create
would be easiest example) expected post data is different from class defined serializer hence autodocumentation gives wrong mock request.Suggestion
variation_id
, withoud productvariation inline serializer.I'm addicted to swagged documentation and willing to apply PR if you are interested in any of such solution. Sorry if I'm missing something.
The text was updated successfully, but these errors were encountered: