diff --git a/docs/source/extensions/example_extension/03_marshaling_data.py b/docs/source/extensions/example_extension/03_marshaling_data.py index a686a775..4015b9fc 100644 --- a/docs/source/extensions/example_extension/03_marshaling_data.py +++ b/docs/source/extensions/example_extension/03_marshaling_data.py @@ -38,7 +38,7 @@ class ExampleIdentifyView(View): microscope = find_component("org.openflexure.microscope") # Return our microscope object, - # let @marshal_with handle formatting the output + # let schema handle formatting the output return microscope @@ -59,7 +59,7 @@ class ExampleRenameView(View): rename(microscope, new_name) # Return our microscope object, - # let @marshal_with handle formatting the output + # let schema handle formatting the output return microscope diff --git a/docs/source/extensions/marshaling.rst b/docs/source/extensions/marshaling.rst index 94f9ce1b..9ee8f384 100644 --- a/docs/source/extensions/marshaling.rst +++ b/docs/source/extensions/marshaling.rst @@ -45,7 +45,7 @@ For example, if you are creating an API route, in which you expect parameters `` age = fields.Integer(required=True) job = fields.String(required=False, missing="Unknown") -To inform your POST method to expect these arguments, use the ``@use_args`` decorator: +To inform your POST method to expect these arguments, use the ``args`` class attribute: .. code-block:: python diff --git a/docs/source/extensions/views.rst b/docs/source/extensions/views.rst index 2b8912b0..a27ec4b2 100644 --- a/docs/source/extensions/views.rst +++ b/docs/source/extensions/views.rst @@ -31,4 +31,4 @@ Swagger documentation At this point, it is useful to introduce the automatically generated Swagger documentation. From any web browser, go to ``http://microscope.local/api/v2/swagger-ui`` (or replace ``microscope.local`` with your microscope's IP address if ``microscope.local`` doesn't work for your system). -This page uses `SwaggerUI `_ to provide visual, interactive API documentation. Find your extensions URL in the documentation under the ``extensions`` group. Basic documentation about the parameters required for your POST method should be visible, as well as an interactive example filled out with the example request given in ``@use_body``. +This page uses `SwaggerUI `_ to provide visual, interactive API documentation. Find your extensions URL in the documentation under the ``extensions`` group. Basic documentation about the parameters required for your POST method should be visible, as well as an interactive example filled out with the example request given in the view ``schema``.