Commit cf199393 authored by Joel Collins's avatar Joel Collins
Browse files

Added class style to decorators that can be applied to view classes

parent e44da64e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ class use_kwargs(use_args):
        use_args.__init__(self, schema, **kwargs)


class doc(object):
class Doc(object):
    def __init__(self, **kwargs):
        self.kwargs = kwargs

@@ -121,8 +121,9 @@ class doc(object):
        update_spec(f, self.kwargs)
        return f

doc = Doc

class tag(object):
class Tag(object):
    def __init__(self, tags):
        if isinstance(tags, str):
            self.tags = [tags]
@@ -136,6 +137,7 @@ class tag(object):
        update_spec(f, {"tags": self.tags})
        return f

tag = Tag

class doc_response(object):
    def __init__(self, code, description=None, **kwargs):