Skip to content

Hard to read schemas from FastAPI #10676

@songyang-dev

Description

@songyang-dev

Q&A (please complete the following information)

  • OS: macOS
  • Browser: safari
  • Version: Version 26.2 (21623.1.14.11.9)
  • Method of installation: FastAPI with Homebrew
  • Swagger-UI version: ?
  • Swagger/OpenAPI version: ?

Describe the bug you're encountering

I am coming from FastAPI, which uses Swagger UI. The generated docs is using grey text on a grey background. This is hard to read.

To reproduce...

Steps to reproduce the behavior:

  1. Create a FastAPI project with the following endpoint.
# Imports and main execution
"""
from fastapi import FastAPI
app = FastAPI()
"""

class TagsResponse(BaseModel):
    """Response model for /api/tags endpoint."""

    models: list[str] = Field(description="List of available models")


@router.get("/api/tags", response_model=TagsResponse)
async def read_tags():
    """
    Fetch a list of models and their details.

    Returns a list of available models with their metadata.
    Complies with the Ollama API specification.
    """

    return TagsResponse(models=[])
  1. Launch the project with fastapi dev and access the docs http://127.0.0.1:8000/docs.
  2. Click Schemas

Expected behavior

The text should be on a clearer background.

Screenshots

Image

Additional context or thoughts

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