tokusumi / fastapi-cloudauth

Simple integration between FastAPI and cloud authentication services (AWS Cognito, Auth0, Firebase Authentication).
MIT License
323 stars 35 forks source link

Add required scopes to generated OpenAPI documentation #52

Open joshm91 opened 2 years ago

joshm91 commented 2 years ago

Hi, firstly, thanks for the great library!

I'm wondering if there's currently any way to allow for the required scopes that are defined in the route decorator to be populated into the OpenAPI documentation that gets generated?

I'm guessing since this library uses the HTTPBearer security scheme rather then OAuth2 that the answer is currently "no". If so, is this something you'd look to add in future? It seems like a pretty handy feature for the API documentation to detail what scopes are required to access certain endpoints.