Sorted remaining content_type issues and blackened

This commit is contained in:
Richard 2021-07-19 20:09:09 +01:00
parent 38fbe530d2
commit b7c9d3b73b
13 changed files with 114 additions and 92 deletions

View file

@ -146,8 +146,19 @@ class CaptureList(PropertyView):
return image_list
CAPTURE_ID_PARAMETER = {
"name": "id_",
"in": "path",
"description": "The unique ID of the capture",
"required": True,
"schema": {"type": "string"},
"example": "eeae7ae9-0c0d-45a4-9ef2-7b84bb67a1d1",
}
class CaptureView(View):
tags = ["captures"]
parameters = [CAPTURE_ID_PARAMETER]
@marshal_with(FullCaptureSchema())
def get(self, id_):
@ -162,6 +173,8 @@ class CaptureView(View):
return capture_obj
get.responses = {404: {"description": "Capture object was not found"}}
def delete(self, id_):
"""
Delete a single image capture
@ -182,7 +195,10 @@ class CaptureView(View):
class CaptureDownload(View):
tags = ["captures"]
responses = {200: {"content_type": "image/jpeg"}}
responses = {
200: {"content": {"image/jpeg": {}}, "description": "Image data in JPEG format"}
}
parameters = [CAPTURE_ID_PARAMETER]
def get(self, id_, filename: Optional[str]):
"""
@ -223,6 +239,7 @@ class CaptureDownload(View):
class CaptureTags(View):
tags = ["captures"]
parameters = [CAPTURE_ID_PARAMETER]
def get(self, id_):
"""
@ -270,6 +287,7 @@ class CaptureTags(View):
class CaptureAnnotations(View):
tags = ["captures"]
parameters = [CAPTURE_ID_PARAMETER]
def get(self, id_):
"""