mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
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:
@@ -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"""
|
||||
|
||||
Reference in New Issue
Block a user