From d7fb9eed6161c4ec8ea83014eaa4ffc818bca522 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 10 Mar 2018 21:43:32 +1100 Subject: [PATCH] Added redoc generated API docs as served via the api.py flask implementation --- api.py | 4 +++- static/docs.html | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 static/docs.html diff --git a/api.py b/api.py index e09788c..f8ad3c4 100644 --- a/api.py +++ b/api.py @@ -18,7 +18,9 @@ def hello(): } return jsonify(response) - +@app.route('/docs') +def docs(): + return app.send_static_file('docs.html') if __name__ == '__main__': app.run(debug=True) diff --git a/static/docs.html b/static/docs.html new file mode 100644 index 0000000..d73dd55 --- /dev/null +++ b/static/docs.html @@ -0,0 +1,12 @@ + + + + API Docs + + + + + + + +