Skip to content

Report the real version in OpenAPI; release 0.7.1 - #20

Merged
mtauha merged 2 commits into
mainfrom
fix/openapi-version
Nov 13, 2026
Merged

mtauha merged 2 commits into
mainfrom
fix/openapi-version

Conversation

@mtauha

@mtauha mtauha commented Nov 13, 2026

Copy link
Copy Markdown
Member

What was wrong

FastAPI(...) in api/main.py was created without version=, so /openapi.json reported FastAPI's default 0.1.0 in info.version. The docs site syncs that spec (sync-openapi.yml), so it showed 0.1.0 too.

Fix

Pass version=__version__ (from api/__init__.py, the same source telemetry uses for service.version). No circular import: api/__init__.py only defines the string.

Test

tests/api/test_openapi.py asserts GET /openapi.json returns info.version == api.__version__.

Results

  • pytest: 236 passed, 13 warnings
  • ruff check api/: all checks passed
  • mypy api: no issues found in 19 source files

CHANGELOG updated under Unreleased > Fixed. No version bump.

@mtauha mtauha changed the title fix: report real API version in OpenAPI spec Report the real version in OpenAPI; release 0.7.1 Nov 13, 2026
@mtauha
mtauha merged commit 9749eff into main Nov 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant