Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

static_url kwarg to apistar.docs is not enough #662

Open
mivade opened this issue Apr 26, 2019 · 0 comments
Open

static_url kwarg to apistar.docs is not enough #662

mivade opened this issue Apr 26, 2019 · 0 comments

Comments

@mivade
Copy link

mivade commented Apr 26, 2019

Following the instructions here I'm trying to create an endpoint in a Tornado app that shows the API documentation. I'm setting up a static file handler similar to this:

from pathlib import Path

import apistar
from tornado.web import StaticFileHandler

# ...

apistar_static_path = Path(apistar.__file__).parent.joinpath("themes", theme_name, "static")
handlers += [
    ("/apistar/(.*)", StaticFileHandler, {"path": str(apistar_static_path)})
]

# ...

This works fine if theme_name = "apistar" but there are several 404s with swaggerui and redoc themes due to missing JS/CSS files that are not included in apistar/themes. If these files aren't going to be included in the package, then there should be a way to specify a vendor URL prefix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant