mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
docs: regenerate swagger docs with new API endpoints
Add comprehensive API documentation for new endpoints including: - Bindings CRUD and batch operations - Namespaces management - Master tenant CRUD, access settings, and realtime stats - Provider CRUD with preset/custom/google variants - Model registry status, refresh, check, and rollback - Log management with stats and webhook config - Key access settings endpoints - Internal stats flush endpoint - Health check endpoint Also adds swagger annotations for FlushStats internal handler.
This commit is contained in:
@@ -29,6 +29,17 @@ type statsFlushEntry struct {
|
||||
LastAccessedAt int64 `json:"last_accessed_at"`
|
||||
}
|
||||
|
||||
// FlushStats godoc
|
||||
// @Summary Flush key stats
|
||||
// @Description Internal endpoint for flushing accumulated key usage stats from DP to CP database
|
||||
// @Tags internal
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body statsFlushRequest true "Stats to flush"
|
||||
// @Success 200 {object} gin.H
|
||||
// @Failure 400 {object} gin.H
|
||||
// @Failure 500 {object} gin.H
|
||||
// @Router /internal/stats/flush [post]
|
||||
func (h *InternalHandler) FlushStats(c *gin.Context) {
|
||||
if h == nil || h.db == nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "database not configured"})
|
||||
|
||||
Reference in New Issue
Block a user