longclawshop/longclaw

api documentation

marojenka opened this issue · 1 comments

  • longclaw version: 1.0.2
  • Django version: 2.2

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

  • 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.

Hi
thanks for the interest in the project.
A PR is always welcome!