First draft of auto-Swagger
This commit is contained in:
parent
99d0d0055e
commit
6d7921e8b4
8 changed files with 205 additions and 21 deletions
|
|
@ -168,4 +168,8 @@ def cleanup():
|
|||
atexit.register(cleanup)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", port="5000", threaded=True, debug=True, use_reloader=False)
|
||||
# app.run(host="0.0.0.0", port="5000", threaded=True, debug=True, use_reloader=False)
|
||||
#from pprint import pprint
|
||||
#pprint(labthing.spec.to_dict())
|
||||
with open('spec.yaml', 'w') as f:
|
||||
f.write(labthing.spec.to_yaml())
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
||||
from openflexure_microscope.common.flask_labthings.resource import Resource
|
||||
from openflexure_microscope.common.flask_labthings.find import find_device
|
||||
from openflexure_microscope.common.flask_labthings.decorators import use_args, marshal_with
|
||||
from openflexure_microscope.common.flask_labthings.decorators import use_args, marshal_with, doc
|
||||
from openflexure_microscope.common.flask_labthings import fields
|
||||
from openflexure_microscope.utilities import filter_dict
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ from openflexure_microscope.api.v2.views.captures import capture_schema
|
|||
import logging
|
||||
from flask import jsonify, request, abort, url_for, redirect, send_file
|
||||
|
||||
|
||||
@doc(tags=["actions"])
|
||||
class CaptureAPI(Resource):
|
||||
"""
|
||||
Create a new image capture.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue