aiohttp-swagger icon indicating copy to clipboard operation
aiohttp-swagger copied to clipboard

Use jinja2 template instead of custom way

Open olexandr-klymenko opened this issue 8 years ago • 0 comments

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

olexandr-klymenko avatar Oct 25 '17 09:10 olexandr-klymenko