Make Swagger Ui the default for API documentation

This commit is contained in:
grossmj
2020-11-02 12:47:59 +10:30
parent 359f9a7384
commit 30d6f1fa2a
3 changed files with 8 additions and 6 deletions

View File

@ -32,11 +32,11 @@ if __name__ == "__main__":
title=app.title + " - Swagger UI",
oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url)
with open("../docs/swagger.html", "w") as fd:
with open("../docs/index.html", "w") as fd:
fd.write(swagger_html.body.decode())
redoc_html = get_redoc_html(openapi_url="openapi.json",
title=app.title + " - ReDoc")
with open("../docs/index.html", "w") as fd:
with open("../docs/redoc.html", "w") as fd:
fd.write(redoc_html.body.decode())