You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making it not unique resulted in a bug in the documentation where all endpoints with the jwt-auth expanded at once, when clicked on.
We fixed it by expanding the for loop below and using an exclude list instead of the operation_id for route in app.routes[4:]: if route.path in ["/excluded", "/endpoint"]: continue
Adding a unique bit to the operation_id and using in also works
The text was updated successfully, but these errors were encountered:
In https://indominusbyte.github.io/fastapi-jwt-auth/advanced-usage/generate-docs/ it is recommended to use
@app.get('/protected', operation_id="authorize")
and later identify the route/endpoint withrouter_authorize = [route for route in app.routes[4:] if route.operation_id == "authorize"]
. This means theoperation_id
is not unique, which is warned against by https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/.Making it not unique resulted in a bug in the documentation where all endpoints with the jwt-auth expanded at once, when clicked on.
We fixed it by expanding the for loop below and using an exclude list instead of the operation_id
for route in app.routes[4:]:
if route.path in ["/excluded", "/endpoint"]:
continue
Adding a unique bit to the
operation_id
and usingin
also worksThe text was updated successfully, but these errors were encountered: