Skip to content

Web docs page is unreachable — shadowed by FastAPI's built-in /docs #39

Description

@CST-100

The web UI defines GET /docs (src/opal/web/routes.py, renders src/opal/web/templates/docs.html), but FastAPI's built-in Swagger UI registers /docs first in create_app() (src/opal/api/app.py — no docs_url override), so the app route never matches. The web docs template has been unreachable dead code the whole time; requests to /docs get the ~1KB Swagger stub.

Surfaced by the max-width survey during the parts UI work (the template was edited for centering before discovering nothing can render it).

Fix is a decision plus a few lines, either:

  • Move the API docs aside — FastAPI(docs_url="/api/docs", redoc_url=None) in create_app() — so the web docs page owns /docs, or
  • Declare Swagger the intended occupant and delete the dead web route + template.

Either way: check nav/templates for links to /docs, and add a render test pinning whichever page owns the URL so it can't silently flip again.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions