How can I add example responses -- (openapi doc) to my swagger doc using drf-yasg package?
drf-yasg How to show sample response with with api?
11.3k views Asked by TNN At
2
How can I add example responses -- (openapi doc) to my swagger doc using drf-yasg package?
Use
drf_yasg.openapi.Response
--(drf-yasg doc) with the help of@swagger_auto_schema(...)
--(drf-yasg doc) decorator asSchema rendered Result
Update
You may need to click on "Example Value" text if you are looking in Swagger doc