How to describe parameters in DRF Docs

后端 未结 2 869
执念已碎
执念已碎 2020-12-31 02:08

I\'m using Django REST Framework v3.6 built-in interactive documentation django_rest_framework.documentation (not django-rest-swagger

2条回答
  •  长发绾君心
    2020-12-31 03:04

    One important thing was not still covered. It is true that a description comes from the help_text attribute, but this is not enough. I have found that the schema generator rely on view's queryset attribute to determine a model. So, keep in mind that you need define it even if you don't need it. For example in case of using APIView.

提交回复
热议问题