openflexure-microscope-server/openflexure_microscope/api/openapi.py
2021-07-14 19:15:26 +01:00

43 lines
1.2 KiB
Python

API_TAGS = [
{
"name": "actions",
"description": (
"Actions that can be run on the microscope. These endpoints represent "
"actions that many not complete immediately, so they run on the server "
"as `Action` objects and their status can be queried using the links "
"embedded in the JSON action description."
),
"externalDocs": "https://iot.mozilla.org/wot/#action-resource",
},
{
"name": "properties",
"description": (
"Properties can be read and/or written to, and affect the "
"state of the microscope."
),
"externalDocs": "https://iot.mozilla.org/wot/#property-resource",
},
{
"name": "captures",
"description": "",
"externalDocs": ""
},
{
"name": "extensions",
"description": "",
"externalDocs": ""
},
{
"name": "events",
"description": "",
"externalDocs": ""
}
]
def add_spec_extras(spec):
"""Add extra documentation and features to the OpenAPI spec"""
# Add a list of tags, so we can control ordering and add descriptions
for t in API_TAGS:
spec.tag(t)