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:
@@ -46,6 +46,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param search query string false "Filter by code, name or text"
|
||||
// @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} ListPaymentTextDTO
|
||||
// @Failure 500 {object} appresult.AppError
|
||||
// @Router /payment-texts [get]
|
||||
@@ -77,6 +78,7 @@ func (h *handler) list(c *gin.Context) {
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param code path string true "Text code"
|
||||
// @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} PaymentTextDTO
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
// @Failure 500 {object} appresult.AppError
|
||||
@@ -119,6 +121,7 @@ func (h *handler) getByCode(c *gin.Context) {
|
||||
// @Security BearerAuth
|
||||
// @Param code path string true "Text code"
|
||||
// @Param body body UpdatePaymentTextDTO true "Payment text payload"
|
||||
// @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} PaymentTextDTO
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
@@ -156,6 +159,7 @@ func (h *handler) update(c *gin.Context) {
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param code path string true "Text code"
|
||||
// @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 403 {object} appresult.AppError
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
|
||||
Reference in New Issue
Block a user