0

We want users to be able to see only a few swagger docs based a django permission given to them, but we don't want to restrict them from using other endpoints that they don't have permission to view. Swagger docs don't provide a way to do this (or at least I haven't seen). Has anyone done this?

  • "we don't want to restrict them from using other endpoints that they don't have permission to view" - that seems a bit back-to-front to me. Why would you not want to allow users access to the documentation of the end points they are _allowed_ to use? – Tony Dec 15 '20 at 00:58
  • The api endpoints are general, so they are used acorss the website (not by the user). We only want to show certain endpoints on the swagger docs. – codesaurusrex Dec 15 '20 at 14:24
  • That makes sense. Does this answer help you? [How to hide endpoints from OpenAPI documentation with Springdoc](https://stackoverflow.com/a/62110788/243925) – Tony Dec 15 '20 at 18:34

0 Answers0