Skip to content

api: duplicate FastAPI operation ID in assets.py breaks OpenAPI client generation #160

Description

@unfoundbox

spacepilot/api/routes/assets.py emits a duplicate operation ID:

UserWarning: Duplicate Operation ID
get_asset_thumbnail_file_api_assets__asset_id__thumbnail_head
for function get_asset_thumbnail_file

It warns on every test_web_api run, so it is already noise everyone has learned to scroll past.

Why it is worth fixing

Duplicate operation IDs break OpenAPI client generation — any generated SDK either drops one of the two operations or fails outright. The repo publishes /openapi.json and docs/MCP-CLIENTS.md points agents at the HTTP surface, so a generated client is a plausible consumer.

The cause is the route being registered for both GET and HEAD without distinct operation_ids. Fix is to give the HEAD route its own operation_id, or register them so FastAPI derives distinct ones.

Provenance

Surfaced by an independent reviewer during the 2026-09-22 train, unrelated to any PR in it. Pre-existing on main.

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