Browse Source

✏️ Fix typo in deprecation warnings in `fastapi/params.py` (#9854)

fix typo for deprecation warnings depreacated -> deprecated
pull/10015/head
Russ Biggs 2 years ago
committed by GitHub
parent
commit
bdd991244d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      fastapi/params.py

6
fastapi/params.py

@ -69,7 +69,7 @@ class Param(FieldInfo):
self.deprecated = deprecated
if example is not _Unset:
warnings.warn(
"`example` has been depreacated, please use `examples` instead",
"`example` has been deprecated, please use `examples` instead",
category=DeprecationWarning,
stacklevel=4,
)
@ -98,7 +98,7 @@ class Param(FieldInfo):
kwargs["examples"] = examples
if regex is not None:
warnings.warn(
"`regex` has been depreacated, please use `pattern` instead",
"`regex` has been deprecated, please use `pattern` instead",
category=DeprecationWarning,
stacklevel=4,
)
@ -512,7 +512,7 @@ class Body(FieldInfo):
self.deprecated = deprecated
if example is not _Unset:
warnings.warn(
"`example` has been depreacated, please use `examples` instead",
"`example` has been deprecated, please use `examples` instead",
category=DeprecationWarning,
stacklevel=4,
)

Loading…
Cancel
Save