Skip to content

Commit

Permalink
deprecate sanic_openapi.api.API
Browse files Browse the repository at this point in the history
  • Loading branch information
artcg committed Mar 21, 2021
1 parent 3da5d35 commit 90b3fe5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sanic_openapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ def __new__(cls, func=None, **kwargs):
Arguments:
func: The decorated request handler function.
"""
import warnings

warnings.warn(
"sanic_openapi.api.API has been marked as deprecated, and may be removed"
" in 0.6.4. \n If you are using this class, please leave"
" an issue in https://github.com/sanic-org/sanic-openapi/issues",
UserWarning,
)

if func is None:
return partial(cls, **kwargs)

Expand Down

0 comments on commit 90b3fe5

Please sign in to comment.