From a06fc59e8ff58df70bf1ee43a411a1ce41eaf9c7 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 14 Dec 2025 12:52:53 +0100 Subject: [PATCH] Add version to /health endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Include version in /health endpoint response - Update test to verify version field - Bump version to 1.1.2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- src/controllers/health_controller.py | 1 + tests/test_health.py | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) 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")