MSP-634 update swagger

This commit is contained in:
DeniskaRediska authored and d1slike committed 2022-08-04 22:13:28 +03:00
1 parent 0d61264e73
commit f65dd9c2aa
8 files changed
+398 -142

No files matched your search

+10 -10
View File
@@ -35,8 +35,8 @@ func NewService(service ServiceService) Service {
// @Produce json
// @Param body body domain.Identity true "Идентификатор сервиса"
// @Success 200 {object} domain.Service
// @Failure 404 {object} structure.GrpcError
// @Failure 500 {object} structure.GrpcError
// @Failure 404 {object} domain.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /service/get_service_by_id [POST]
func (c Service) GetById(ctx context.Context, req domain.Identity) (*domain.Service, error) {
result, err := c.service.GetById(ctx, req.Id)
@@ -58,7 +58,7 @@ func (c Service) GetById(ctx context.Context, req domain.Identity) (*domain.Serv
// @Produce json
// @Param body body []integer false "Массив идентификаторов сервисов"
// @Success 200 {array} domain.Service
// @Failure 500 {object} structure.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /service/get_service [POST]
func (c Service) Get(ctx context.Context, req []int) ([]domain.Service, error) {
return c.service.GetByIdList(ctx, req)
@@ -72,7 +72,7 @@ func (c Service) Get(ctx context.Context, req []int) ([]domain.Service, error) {
// @Produce json
// @Param body body domain.Identity true "Идентификатор домена"
// @Success 200 {array} domain.Service
// @Failure 500 {object} structure.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /service/get_services_by_domain_id [POST]
func (c Service) GetByDomainId(ctx context.Context, req domain.Identity) ([]domain.Service, error) {
return c.service.GetByDomainId(ctx, req.Id)
@@ -86,10 +86,10 @@ func (c Service) GetByDomainId(ctx context.Context, req domain.Identity) ([]doma
// @Produce json
// @Param body body domain.ServiceCreateUpdateRequest true "Объект сервиса"
// @Success 200 {object} domain.Service
// @Failure 400 {object} structure.GrpcError
// @Failure 404 {object} structure.GrpcError
// @Failure 409 {object} structure.GrpcError
// @Failure 500 {object} structure.GrpcError
// @Failure 400 {object} domain.GrpcError
// @Failure 404 {object} domain.GrpcError
// @Failure 409 {object} domain.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /service/create_update_service [POST]
func (c Service) CreateUpdate(ctx context.Context, req domain.ServiceCreateUpdateRequest) (*domain.Service, error) {
result, err := c.service.CreateUpdate(ctx, req)
@@ -115,8 +115,8 @@ func (c Service) CreateUpdate(ctx context.Context, req domain.ServiceCreateUpdat
// @Produce json
// @Param body body []integer true "Массив идентификаторов сервисов"
// @Success 200 {object} domain.DeleteResponse
// @Failure 400 {object} structure.GrpcError
// @Failure 500 {object} structure.GrpcError
// @Failure 400 {object} domain.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /service/delete_service [POST]
func (c Service) Delete(ctx context.Context, req []int) (*domain.DeleteResponse, error) {
if len(req) == 0 {