Removed openapi endpoints (now in LabThings)
This commit is contained in:
parent
e2990b5b38
commit
a8b1efb7cd
3 changed files with 0 additions and 26 deletions
|
|
@ -156,8 +156,6 @@ labthing.add_view(
|
||||||
views.NestedConfigurationProperty, "/instrument/configuration/<path:route>"
|
views.NestedConfigurationProperty, "/instrument/configuration/<path:route>"
|
||||||
)
|
)
|
||||||
labthing.add_root_link(views.ConfigurationProperty, "instrumentConfiguration")
|
labthing.add_root_link(views.ConfigurationProperty, "instrumentConfiguration")
|
||||||
labthing.add_view(views.APISpecJSONView, "/docs/swagger.json")
|
|
||||||
labthing.add_view(views.APISpecYAMLView, "/docs/swagger.yaml")
|
|
||||||
|
|
||||||
# Attach stage resources
|
# Attach stage resources
|
||||||
labthing.add_view(views.StageTypeProperty, "/instrument/stage/type")
|
labthing.add_view(views.StageTypeProperty, "/instrument/stage/type")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
from .actions import enabled_root_actions
|
from .actions import enabled_root_actions
|
||||||
from .camera import *
|
from .camera import *
|
||||||
from .captures import *
|
from .captures import *
|
||||||
from .docs import *
|
|
||||||
from .instrument import *
|
from .instrument import *
|
||||||
from .stage import *
|
from .stage import *
|
||||||
from .streams import *
|
from .streams import *
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
from flask import Response
|
|
||||||
from labthings import current_labthing
|
|
||||||
from labthings.views import View
|
|
||||||
|
|
||||||
|
|
||||||
class APISpecJSONView(View):
|
|
||||||
"""OpenAPI v3 documentation
|
|
||||||
|
|
||||||
A JSON document containing an API description in OpenAPI format
|
|
||||||
"""
|
|
||||||
|
|
||||||
def get(self):
|
|
||||||
return current_labthing().spec.to_dict()
|
|
||||||
|
|
||||||
|
|
||||||
class APISpecYAMLView(View):
|
|
||||||
"""OpenAPI v3 documentation
|
|
||||||
|
|
||||||
A YAML document containing an API description in OpenAPI format
|
|
||||||
"""
|
|
||||||
|
|
||||||
def get(self):
|
|
||||||
return Response(current_labthing().spec.to_yaml(), mimetype="text/yaml")
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue