Refactored adding views, actions, props and components

This commit is contained in:
Joel Collins 2020-01-11 14:58:50 +00:00
parent 7715c19305
commit a4196b6765
10 changed files with 62 additions and 66 deletions

View file

@ -20,10 +20,12 @@ 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 = {
"path": rule, # TODO: Validate this slightly (leading / etc)