Created @ltaction and @ltproperty decorators

This commit is contained in:
Joel Collins 2020-01-08 18:38:52 +00:00
parent d12fd3e02c
commit 3cbd0416d0
4 changed files with 47 additions and 26 deletions

View file

@ -20,6 +20,9 @@ def update_spec(obj, spec):
rupdate(obj.__apispec__, spec)
return obj.__apispec__
def get_spec(obj):
obj.__apispec__ = obj.__dict__.get("__apispec__", {})
return obj.__apispec__
def view2path(rule: str, view: Resource, spec: APISpec):
params = {