Add /api/health endpoint to API documentation

Added /api/health endpoint for monitoring and status verification.
Returns service status, name, and version information.
Now visible in Swagger docs at /api/docs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 12:48:38 -05:00
parent 6716a9daff
commit fae302ec37
+10
View File
@@ -854,6 +854,7 @@ def api_index():
"openapi_json": "/api/openapi.json"
},
"endpoints": {
"health": "/api/health",
"search": "/api/search?q={query}",
"verse_of_the_day": "/api/verse-of-the-day",
"verse": "/api/verse/{book}/{chapter}/{verse}",
@@ -872,6 +873,15 @@ def api_index():
}
}
@app.get("/api/health")
def api_health_check():
"""API health check endpoint for monitoring and status verification"""
return {
"status": "healthy",
"service": "KJV Study API",
"version": "1.0.0"
}
@app.get("/api/search")
def search_api(q: str = Query(..., description="Search query", example="faith"), limit: Optional[int] = Query(None, description="Max results", example=10)):
"""JSON API endpoint for search"""