Fixed leftover decorator references
This commit is contained in:
parent
9ae2ae06d0
commit
3100530edb
3 changed files with 4 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ class ExampleIdentifyView(View):
|
||||||
microscope = find_component("org.openflexure.microscope")
|
microscope = find_component("org.openflexure.microscope")
|
||||||
|
|
||||||
# Return our microscope object,
|
# Return our microscope object,
|
||||||
# let @marshal_with handle formatting the output
|
# let schema handle formatting the output
|
||||||
return microscope
|
return microscope
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ class ExampleRenameView(View):
|
||||||
rename(microscope, new_name)
|
rename(microscope, new_name)
|
||||||
|
|
||||||
# Return our microscope object,
|
# Return our microscope object,
|
||||||
# let @marshal_with handle formatting the output
|
# let schema handle formatting the output
|
||||||
return microscope
|
return microscope
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ For example, if you are creating an API route, in which you expect parameters ``
|
||||||
age = fields.Integer(required=True)
|
age = fields.Integer(required=True)
|
||||||
job = fields.String(required=False, missing="Unknown")
|
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
|
.. code-block:: python
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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).
|
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 <https://swagger.io/tools/swagger-ui/>`_ 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 <https://swagger.io/tools/swagger-ui/>`_ 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``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue