From 9ec77955430812b02e88b9955eddaa156f1e871e Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 13 Jan 2020 16:32:24 +0000 Subject: [PATCH] Added 404 description --- openflexure_microscope/api/v2/views/state.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/v2/views/state.py b/openflexure_microscope/api/v2/views/state.py index 378608da..1da71698 100644 --- a/openflexure_microscope/api/v2/views/state.py +++ b/openflexure_microscope/api/v2/views/state.py @@ -9,7 +9,7 @@ from openflexure_microscope.common.labthings_core.utilities import ( from openflexure_microscope.common.flask_labthings.find import find_component from openflexure_microscope.common.flask_labthings.resource import Resource -from openflexure_microscope.common.flask_labthings.decorators import ThingProperty, Tag +from openflexure_microscope.common.flask_labthings.decorators import ThingProperty, Tag, doc_response from flask import jsonify, request, abort import logging @@ -42,6 +42,7 @@ class SettingsProperty(Resource): @Tag("properties") class NestedSettingsProperty(Resource): + @doc_response(404, description="Settings key cannot be found") def get(self, route): """ Show a nested section of the current microscope settings @@ -56,6 +57,7 @@ class NestedSettingsProperty(Resource): return jsonify(value) + @doc_response(404, description="Settings key cannot be found") def put(self, route): """ Update a nested section of the current microscope settings @@ -85,6 +87,7 @@ class StatusProperty(Resource): @Tag("properties") class NestedStatusProperty(Resource): + @doc_response(404, description="Status key cannot be found") def get(self, route): """ Show a nested section of the current microscope state