fix(api): bind version and health endpoints to app.__version__
This commit is contained in:
@@ -241,12 +241,14 @@ def get_openapi_spec():
|
||||
"""Serves the OpenAPI 3.0 specification for Schemathesis / DAST and Swagger UI."""
|
||||
return jsonify(OPENAPI_SPEC)
|
||||
|
||||
from app import __version__
|
||||
|
||||
@api_openapi_bp.route('/version', methods=['GET'])
|
||||
def get_api_version():
|
||||
"""Returns the backend API version information."""
|
||||
return jsonify({
|
||||
"name": "Edu-Space REST API",
|
||||
"version": "3.3.0",
|
||||
"version": __version__,
|
||||
"status": "healthy"
|
||||
}), 200
|
||||
|
||||
@@ -255,5 +257,5 @@ def get_api_health():
|
||||
"""Liveness probe for backend API."""
|
||||
return jsonify({
|
||||
"status": "ok",
|
||||
"version": "3.3.0"
|
||||
"version": __version__
|
||||
}), 200
|
||||
|
||||
Reference in New Issue
Block a user