mirror of https://github.com/tiangolo/fastapi.git
Fix `scopes` deprecation message and `Security` docstring
This commit is contained in:
parent
f42161cd19
commit
367b272a60
|
|
@ -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…
Reference in New Issue