Commit d656ce24 authored by jtc42's avatar jtc42
Browse files

Use update_spec

parent 4a6e6726
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -95,7 +95,12 @@ class doc_response(object):

    def __call__(self, f):
        # Pass params to call function attribute for external access
        f.__apispec__ = f.__dict__.get("__apispec__", {})
        d = {"responses": {self.code: {"description": self.description, **self.kwargs}}}
        rupdate(f.__apispec__, d)
        update_spec(
            f,
            {
                "responses": {
                    self.code: {"description": self.description, **self.kwargs}
                }
            },
        )
        return f