Permalink
Browse files

Merge pull request #2 from devjack/docs

Added redoc generated API docs
  • Loading branch information...
devjack committed Mar 10, 2018
2 parents 4eb5325 + d7fb9ee commit 4bf5392747aef4349395c0bc8694ea50f94efd47
Showing with 15 additions and 1 deletion.
  1. +3 −1 api.py
  2. +12 −0 static/docs.html
4 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)
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>API Docs</title>
<!-- needed for mobile devices -->
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<redoc spec-url="https://raw.githubusercontent.com/devjack/echo-api-example/master/openapi.yml"></redoc>
<script src="https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"></script>
</body>
</html>

0 comments on commit 4bf5392

Please sign in to comment.