aiohttp-swagger
aiohttp-swagger copied to clipboard
Use jinja2 template instead of custom way
Ath the moment a custom template way is implemented in the package:
with open(join(STATIC_PATH, "index.html"), "r") as f:
app["SWAGGER_TEMPLATE_CONTENT"] = (
f.read()
.replace("##SWAGGER_CONFIG##", '/{}{}'.
format(api_base_url.lstrip('/'), _swagger_def_url))
.replace("##STATIC_PATH##", '/{}{}'.
format(api_base_url.lstrip('/'), statics_path)))
It should be replced by jinja2 Template as far as de-facto standard