MSP-8172 Add swagger structure fields comments
This commit is contained in:
1 parent
896f08a8cb
commit
84c3529a66
12 files changed
+315
-147
No files matched your search
+1
-1
@@ -121,7 +121,7 @@ func (a Auth) Login(ctx context.Context, authRequest domain.LoginRequest) (*doma
|
||||
// @Produce json
|
||||
// @Param body body domain.LoginSudirRequest true "Тело запроса"
|
||||
// @Success 200 {object} domain.LoginResponse
|
||||
// @Failure 401 {object} domain.GrpcError "Некорректный код для авторизации"
|
||||
// @Failure 401 {object} domain.GrpcError "Некорректный код для авторизации или неизвестное название клиента"
|
||||
// @Failure 412 {object} domain.GrpcError "Авторизация СУДИР не настроена на сервере"
|
||||
// @Failure 500 {object} domain.GrpcError
|
||||
// @Router /auth/login_with_sudir [POST]
|
||||
|
||||
@@ -2,15 +2,19 @@ package controller
|
||||
|
||||
import (
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/domain"
|
||||
)
|
||||
|
||||
type Customization struct {
|
||||
uiCfg conf.UIDesign
|
||||
uiCfg domain.UIDesign
|
||||
}
|
||||
|
||||
func NewCustomization(uiCfg conf.UIDesign) Customization {
|
||||
return Customization{
|
||||
uiCfg: uiCfg,
|
||||
uiCfg: domain.UIDesign{
|
||||
Name: uiCfg.Name,
|
||||
PrimaryColor: uiCfg.PrimaryColor,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +25,10 @@ func NewCustomization(uiCfg conf.UIDesign) Customization {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Success 200 {object} conf.UIDesign
|
||||
// @Success 200 {object} domain.UIDesign
|
||||
// @Failure 400 {object} domain.GrpcError "Невалидный токен"
|
||||
// @Failure 500 {object} domain.GrpcError
|
||||
// @Router /user/get_design [POST]
|
||||
func (c Customization) GetUIDesign() (conf.UIDesign, error) {
|
||||
func (c Customization) GetUIDesign() (domain.UIDesign, error) {
|
||||
return c.uiCfg, nil
|
||||
}
|
||||
Reference in new issue
Block a user