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:
@@ -55,6 +55,7 @@ func (h *handler) Register(router *gin.RouterGroup) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body LoginDTO true "Login 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 401 {object} appresult.AppError
|
||||
@@ -91,6 +92,7 @@ func (h *handler) login(c *gin.Context) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body RegisterDTO true "Registration 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 409 {object} appresult.AppError
|
||||
@@ -118,6 +120,7 @@ func (h *handler) register(c *gin.Context) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body VerifyDTO true "Verification 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 409 {object} appresult.AppError
|
||||
@@ -145,6 +148,7 @@ func (h *handler) verify(c *gin.Context) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body ForgotPasswordDTO true "Forgot password 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
@@ -172,6 +176,7 @@ func (h *handler) forgotPassword(c *gin.Context) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body ResetPasswordDTO true "Reset password 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 404 {object} appresult.AppError
|
||||
@@ -217,6 +222,7 @@ func (h *handler) respondRegisterError(c *gin.Context, err error) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body RefreshTokenDTO true "Refresh token 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 401 {object} appresult.AppError
|
||||
@@ -247,6 +253,7 @@ func (h *handler) refreshToken(c *gin.Context) {
|
||||
// @Tags auth
|
||||
// @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
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 401 {object} appresult.AppError
|
||||
@@ -277,6 +284,7 @@ func (h *handler) getProfile(c *gin.Context) {
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param body body UpdateProfileDTO true "Profile 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} appresult.AppSuccess
|
||||
// @Failure 400 {object} appresult.AppError
|
||||
// @Failure 401 {object} appresult.AppError
|
||||
|
||||
Reference in New Issue
Block a user