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

static_url kwarg to apistar.docs is not enough #662

Description

@mivade

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions