Browse Source

docs: documenting edge case in Security's scopes parameter

adding a short information about the case where a string is given in
place of a list of strings (or similar) on the Doc of the Security
function in fastapi/param_functions.py
pull/13369/head
Joao-Pedro-P-Holanda 2 months ago
parent
commit
5e2896fd3c
  1. 3
      fastapi/param_functions.py

3
fastapi/param_functions.py

@ -2295,7 +2295,8 @@ def Security( # noqa: N802
Doc(
"""
OAuth2 scopes required for the *path operation* that uses this Security
dependency.
dependency. If a string is given, the list of scopes will have only one scope
defined by the string value.
The term "scope" comes from the OAuth2 specification, it seems to be
intentionally vague and interpretable. It normally refers to permissions,

Loading…
Cancel
Save