Skip to content

Commit 959ef15

Browse files
author
Joel Collins
committed
Removed old doc_response decorator
1 parent caa983b commit 959ef15

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/labthings/server/decorators.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -110,34 +110,3 @@ def __call__(self, viewcls: View):
110110

111111

112112
semtype = Semtype
113-
114-
115-
class doc_response:
116-
def __init__(self, code, description=None, mimetype=None, **kwargs):
117-
self.code = code
118-
self.description = description
119-
self.kwargs = kwargs
120-
self.mimetype = mimetype
121-
122-
self.response_dict = {
123-
"responses": {
124-
self.code: {
125-
"description": self.description or HTTPStatus(self.code).phrase,
126-
**self.kwargs,
127-
}
128-
}
129-
}
130-
131-
if self.mimetype:
132-
self.response_dict = merge(
133-
self.response_dict,
134-
{
135-
"responses": {self.code: {"content": {self.mimetype: {}}}},
136-
"_content_type": self.mimetype,
137-
},
138-
)
139-
140-
def __call__(self, f):
141-
# Pass params to call function attribute for external access
142-
update_spec(f, self.response_dict)
143-
return f

0 commit comments

Comments
 (0)