Browse Source

Fix `scopes` deprecation message and `Security` docstring

pull/14407/head
Yurii Motov 7 months ago
parent
commit
367b272a60
  1. 6
      fastapi/param_functions.py

6
fastapi/param_functions.py

@ -2396,6 +2396,8 @@ def Security( # noqa: N802
```python ```python
Security(dependency_fn, oauth_scopes=["items", "users"]) Security(dependency_fn, oauth_scopes=["items", "users"])
``` ```
​
""" """
), ),
] = None, ] = None,
@ -2438,8 +2440,8 @@ def Security( # noqa: N802
Declare a FastAPI Security dependency. Declare a FastAPI Security dependency.
The only difference with a regular dependency is that it can declare OAuth2 The only difference with a regular dependency is that it can declare OAuth2
scopes that will be integrated with OpenAPI and the automatic UI docs (by default scopes (`oauth_scopes` parameter) that will be integrated with OpenAPI and the
at `/docs`). automatic UI docs (by default at `/docs`).
It takes a single "dependable" callable (like a function). It takes a single "dependable" callable (like a function).

Loading…
Cancel
Save