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

+6 -6
View File
@@ -34,8 +34,8 @@ func NewDomain(service DomainService) Domain {
// @Produce json
// @Param body body domain.Identity true "Идентификатор домена"
// @Success 200 {object} domain.Domain
// @Failure 404 {object} structure.GrpcError
// @Failure 500 {object} structure.GrpcError
// @Failure 404 {object} domain.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /domain/get_domain_by_id [POST]
func (c Domain) GetById(ctx context.Context, req domain.Identity) (*domain.Domain, error) {
result, err := c.service.GetById(ctx, req.Id)
@@ -57,7 +57,7 @@ func (c Domain) GetById(ctx context.Context, req domain.Identity) (*domain.Domai
// @Produce json
// @Param body body integer false "Идентификатор системы"
// @Success 200 {array} domain.Domain
// @Failure 500 {object} structure.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /domain/get_domains_by_system_id [POST]
func (c Domain) GetBySystemId(ctx context.Context) ([]domain.Domain, error) {
return c.service.GetBySystemId(ctx, domain.DefaultSystemId)
@@ -71,7 +71,7 @@ func (c Domain) GetBySystemId(ctx context.Context) ([]domain.Domain, error) {
// @Produce json
// @Param body body domain.DomainCreateUpdateRequest true "Объект домена"
// @Success 200 {object} domain.Domain
// @Failure 500 {object} structure.GrpcError
// @Failure 500 {object} domain.GrpcError
// @Router /domain/create_update_domain [POST]
func (c Domain) CreateUpdate(ctx context.Context, req domain.DomainCreateUpdateRequest) (*domain.Domain, error) {
result, err := c.service.CreateUpdate(ctx, req, domain.DefaultSystemId)
@@ -97,8 +97,8 @@ func (c Domain) CreateUpdate(ctx context.Context, req domain.DomainCreateUpdateR
// @Produce json
// @Param body body []integer false "Массив идентификаторов доменов"
// @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 /domain/delete_domains [POST]
func (c Domain) Delete(ctx context.Context, req []int) (*domain.DeleteResponse, error) {
if len(req) == 0 {