From ec992c083f67d98788d54091dc0f6c857ed86b8d Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 19 Jul 2021 21:40:28 +0100 Subject: [PATCH] Describe filename param in capture download --- openflexure_microscope/api/v2/views/captures.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/v2/views/captures.py b/openflexure_microscope/api/v2/views/captures.py index 0903c35e..e7def4f7 100644 --- a/openflexure_microscope/api/v2/views/captures.py +++ b/openflexure_microscope/api/v2/views/captures.py @@ -198,7 +198,17 @@ class CaptureDownload(View): responses = { 200: {"content": {"image/jpeg": {}}, "description": "Image data in JPEG format"} } - parameters = [CAPTURE_ID_PARAMETER] + parameters = [ + CAPTURE_ID_PARAMETER, + { + "name": "filename", + "in": "path", + "description": "The filename of the downloaded image.", + "required": False, + "schema": {"type": "string"}, + "example": "myimage.jpeg", + } + ] def get(self, id_, filename: Optional[str]): """