swagger: document the ?lang= query parameter on every admin endpoint
appresult.Localize applies to all /api/admin routes, so each handler's godoc now declares lang (tm, ru, en, all; default tm) and Swagger UI offers it as a dropdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,6 +47,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
|
||||
// @Security BearerAuth
|
||||
// @Param year query int false "Year for the monthly trend chart" default(current year)
|
||||
// @Param recent_limit query int false "Number of recent activity items to return" default(10)
|
||||
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
|
||||
// @Success 200 {object} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 500 {object} appresult.AppError
|
||||
@@ -75,6 +76,7 @@ func (h *handler) overview(c *gin.Context) {
|
||||
// @Tags dashboard
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param lang query string false "Language of localized fields; all returns the full {en, ru, tm} objects" Enums(tm, ru, en, all) default(tm)
|
||||
// @Success 200 {object} appresult.AppSuccess{data=sysstats.Stats}
|
||||
// @Failure 500 {object} appresult.AppError
|
||||
// @Router /dashboard/server-stats [get]
|
||||
|
||||
Reference in New Issue
Block a user