Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 12 additions & 0 deletions static/docs.html
Original file line number Diff line number Diff line change
@@ -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>