0

I am a little confused how to develop the documentation using the drf-yasg library. So I would like to ask exactly:

  1. How can I use a static swagger.json file created by swagger editor online with drf-yasg? (There are endpoints in my project that don't have serializers and models, so i created the schema manually!)

  2. My project use a permissions control with custom management. Is there any way to manage the endpoints urls in the schema if the user is not allowed permission to view specific endpoint?

vic.py
  • 409
  • 10
  • 22

1 Answers1

0
  • drf-yasg creates the swagger.json file by crawling your django-rest-framework application. You cannot use it to merge an existing swagger.json file.

  • You can specify permissions using permission_classes=(permissions.AllowAny,),. See related.

Rohit
  • 428
  • 4
  • 17