Started adding more content to openapi
This commit is contained in:
parent
8422e8bfef
commit
6a7c305468
2 changed files with 46 additions and 0 deletions
43
openflexure_microscope/api/openapi.py
Normal file
43
openflexure_microscope/api/openapi.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue