I have an APIFlask app that servers Swagger UI and OpenAPI spec endpoints. (/docs and /openapi.json, respectively.)
I have successfully implementer JWT-based Bearer auth to protect my own endpoints, but I don't see any obvious way to protect the auto-generated Swagger UI and OpenAPI spec endpoints.
Suggestions?
From version 2.1.0, we can add the auth decorators with the
SPEC_DECORATORSorDOCS_DECORATORSconfiguration.See more with: https://apiflask.com/openapi/#protect-openapi-endpoints