diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3437b..6ee1cec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.2] - 2024-12-14 + +### Added + +- Version field to /health endpoint response + ## [1.1.1] - 2024-12-14 ### Added diff --git a/pyproject.toml b/pyproject.toml index 565a1b0..834d469 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "core-api" -version = "1.1.1" +version = "1.1.2" description = "Core Code API - Infrastructure management and tools API" readme = "README.md" requires-python = ">=3.12" diff --git a/src/controllers/health_controller.py b/src/controllers/health_controller.py index ff21ad0..9a237da 100644 --- a/src/controllers/health_controller.py +++ b/src/controllers/health_controller.py @@ -85,6 +85,7 @@ class HealthController(BaseController): return { "status": "healthy", + "version": settings.app_version, "ollama_connected": ollama_healthy } diff --git a/tests/test_health.py b/tests/test_health.py index 6eda20d..7996411 100644 --- a/tests/test_health.py +++ b/tests/test_health.py @@ -73,6 +73,7 @@ class TestHealthEndpoint: data = response.json() assert "status" in data + assert "version" in data assert "ollama_connected" in data @patch("src.controllers.health_controller.get_ollama_client")