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:
zenfun
2025-12-22 13:03:52 +08:00
parent 2c5ccd56ee
commit de1d23cce5
4 changed files with 10326 additions and 0 deletions

View File

@@ -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"})