{"openapi":"3.0.0","info":{"title":"1881.prbs-newsresource-s-rest-v1","description":"Новостной ресурс","contact":{"email":"vadonev@vtb.ru","name":"VTB.Home","url":"https://wiki.corp.dev.vtb/pages/viewpage.action?pageId=2911697719"},"version":"1.0.0"},"servers":[{"url":"https://prbs-newsresource-api.apps.ps5-genr02.region.vtb.ru/ui-api-web/cross/prbs/newsresource/v1","description":"PROD"},{"url":"https://prbs-newsresource-api.apps.rs5-genr02.test.vtb.ru/ui-api-web/cross/prbs/newsresource/v1","description":"PREPROD"},{"url":"https://prbs-newsresource-api.apps.ss5-genr02.test.vtb.ru/ui-api-web/cross/prbs/newsresource/v1","description":"IFT"},{"url":"https://prbs-newsresource-api.apps.ds5-genr03.corp.dev.vtb/ui-api-web/cross/prbs/newsresource/v1","description":"DSO"}],"paths":{"/news":{"post":{"tags":["NewsArticleController"],"summary":"получение новостных статей","operationId":"getNews","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsBody"}}}},"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/News"}}}},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/admin/news":{"post":{"tags":["AdminController"],"summary":"создание новостной статьи","operationId":"postNews","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostNews"}}}},"responses":{"201":{"description":"success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id"],"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"}}}}}},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/admin/news/sub-state":{"post":{"tags":["AdminController"],"summary":"изменение статуса публикации новостной статьи на главной странице","operationId":"postStatusNews","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostStates"}}}},"responses":{"201":{"description":"Новостная статья создана"},"400":{"description":"Неверный запрос"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/admin/news/{id}":{"get":{"tags":["AdminController"],"summary":"получение новостной статьи","operationId":"getNewsArticleAdmin","parameters":[{"name":"id","in":"path","required":true,"description":"id новости","schema":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsArticleAdmin"}}}},"400":{"description":"Некорректный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"404":{"description":"Новость не найдена"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}},"put":{"tags":["AdminController"],"summary":"редактирование новостной статьи","operationId":"putNews","parameters":[{"name":"id","in":"path","required":true,"description":"id новости","schema":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostNews"}}}},"responses":{"200":{"description":"Новостная статья изменена"},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"404":{"description":"Новость не найдена"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/news/{id}/{contentType}":{"get":{"tags":["NewsArticleController"],"summary":"получение новостной статьи","operationId":"getNewsArticle","parameters":[{"name":"id","in":"path","required":true,"description":"id новости","schema":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"}},{"name":"contentType","in":"path","required":true,"description":"Тип контента","schema":{"maxLength":64,"type":"string","format":"text","description":"Тип контента JSON/Markdown","example":"JSON","enum":["JSON","MARKDOWN"]}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsArticle"}}}},"400":{"description":"Некорректный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"404":{"description":"Новость не найдена"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/news/{id}/recommendations":{"get":{"tags":["NewsArticleController"],"summary":"получение рекомендованных новостных статей к данной","operationId":"getRecommendations","parameters":[{"name":"id","in":"path","required":true,"description":"id новости","schema":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Recommendations"}}}}},"400":{"description":"Некорректный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"404":{"description":"Новости не найдены"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/news/widget":{"get":{"tags":["NewsArticleController"],"summary":"получение новостных статей для виджета на главной странице","operationId":"getNewsWidget","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Widget"}}}}},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/departments":{"get":{"tags":["DepartmentController"],"summary":"получение списка департаментов","operationId":"getDepartments","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Departments"}}}},"500":{"description":"Внутренняя ошибка сервера"}}}},"/states":{"get":{"tags":["StateController"],"summary":"получение списка статусов новости","operationId":"getNewsStates","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/States"}}}}},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/sub-states":{"get":{"tags":["SubStateController"],"summary":"получение списка статусов публикации на главной","operationId":"getNewsSubStates","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/SubStates"}}}}},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/rubrics":{"get":{"tags":["RubricController"],"summary":"получение списка рубрик","operationId":"getNewsRubrics","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Rubrics"}}}}},"500":{"description":"Внутренняя ошибка сервера"}}}},"/likes":{"post":{"tags":["LikeController"],"summary":"добавление/cнятие лайка","operationId":"postLikes","requestBody":{"description":"Состояние лайка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Likes"}}}},"responses":{"201":{"description":"Лайк добавлен/снят"},"400":{"description":"Неверный запрос"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/comments/{id}":{"get":{"tags":["CommentController"],"summary":"получение комментариев","operationId":"getComments","parameters":[{"name":"id","in":"path","description":"id объекта","required":true,"schema":{"maxLength":64,"type":"string","format":"text","example":"123e4567-e89b-12d3-a456-426655440000"}},{"in":"query","name":"top","description":"Лимит на заданное число комментариев","required":true,"schema":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":4}},{"in":"query","name":"skip","description":"Пропущенное количество комментариев","required":true,"schema":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":8}}],"responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentsInfo"}}}},"400":{"description":"Некорректный запрос"},"401":{"description":"Ошибка аутентификации"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}},"put":{"tags":["CommentController"],"summary":"изменение комментария","operationId":"putComment","parameters":[{"name":"id","in":"path","description":"id комментария","required":true,"schema":{"maxLength":64,"type":"string","format":"text","example":"123e4567-e89b-12d3-a456-426655440000"}}],"requestBody":{"description":"Текст комментария","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutComments"}}}},"responses":{"200":{"description":"Комментарий изменен"},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}},"delete":{"tags":["CommentController"],"summary":"удаление комментария","operationId":"deleteComment","parameters":[{"name":"id","in":"path","description":"id комментария","required":true,"schema":{"maxLength":64,"type":"string","format":"text","example":"123e4567-e89b-12d3-a456-426655440000"}}],"responses":{"200":{"description":"Комментарий удален"},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/comments":{"post":{"tags":["CommentController"],"summary":"добавление комментария","operationId":"postComment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostComments"}}}},"responses":{"201":{"description":"success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id"],"properties":{"id":{"maxLength":64,"type":"string","format":"text","description":"Id комментария","example":"123e4567-e89b-12d3-a456-426655440000"}}}}}},"400":{"description":"Неверный запрос"},"401":{"description":"Ошибка аутентификации"},"403":{"description":"Доступ запрещен"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}},"/user-info":{"get":{"tags":["UserInfoController"],"summary":"получение информации по пользователю","operationId":"getUserRoles","responses":{"200":{"description":"success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoles"}}}},"401":{"description":"Ошибка аутентификации"},"422":{"description":"Возвращаются некорректные данные"},"500":{"description":"Внутренняя ошибка сервера"}}}}},"components":{"schemas":{"Widget":{"required":["id","header","rubricId","rubricName","dtStart"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"},"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":1},"rubricName":{"maxLength":255,"type":"string","description":"Наименование рубрики","example":"Игры"},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата начала публикации новостной статьи"},"amountLikes":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество лайков","example":111},"amountViews":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество просмотров","example":122},"amountComments":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество комментариев","example":10}}},"News":{"required":["results","total","userDepartmentTotal"],"type":"object","additionalProperties":false,"properties":{"results":{"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/NewsArticles"}},"total":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Общее количество новостных статей","example":500},"userDepartmentTotal":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество новостных статей по департаменту пользователя","example":500}}},"NewsBody":{"type":"object","required":["top","skip"],"additionalProperties":false,"properties":{"top":{"description":"Лимит на заданное число новостных статей","type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":4},"skip":{"description":"Пропущенное количество новостных статей","type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":8},"search":{"description":"Поиск по новостным статьям","type":"string","maxLength":255,"example":"Годовая премия"},"stateIds":{"description":"Фильтрация по статусу новости","type":"array","maxItems":1000,"items":{"type":"string","maxLeght":255}},"subStateIds":{"description":"Фильтрация по статусу публикации на главной","type":"array","maxItems":1000,"items":{"type":"string","maxLeght":255}},"departmentId":{"description":"Фильтрация по автору (id департамента)","type":"integer","minimum":-999999999999999,"maximum":999999999999999,"example":21212331},"rubricId":{"description":"Фильтрация по выбранной рубрике","type":"integer","minimum":-999999999999999,"maximum":999999999999999,"example":8},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Фильтрация по дате начала публикации"},"dtEnd":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Фильтрация по дате окончания публикации"}}},"NewsArticles":{"required":["id","header","rubricId","rubricName","dtStart"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"},"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"stateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса новости","example":"Опубликована"},"stateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"},"subStateId":{"type":"string","maxLength":255,"description":"Id статуса публикации на главной","example":"REQUEST"},"subStateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса публикации на главной","example":"Опубликована"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":1},"rubricName":{"maxLength":255,"type":"string","description":"Наименование рубрики","example":"Игры"},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата начала публикации новостной статьи"},"amountLikes":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество лайков","example":111},"amountViews":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество просмотров","example":122},"amountComments":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество комментариев","example":10}}},"NewsArticle":{"required":["header","rubricId","rubricName","departmentId","departmentName","dtStart"],"type":"object","additionalProperties":false,"properties":{"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"stateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса новости","example":"Опубликована"},"stateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"},"subStateId":{"type":"string","maxLength":255,"description":"Id статуса публикации на главной","example":"REQUEST"},"subStateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса публикации на главной","example":"Опубликована"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":1},"rubricName":{"maxLength":255,"type":"string","description":"Наименование рубрики","example":"Игры"},"departmentId":{"description":"id департамента","type":"integer","minimum":-999999999999999,"maximum":999999999999999,"example":21212331},"departmentName":{"maxLength":255,"type":"string","description":"Наименование департамента"},"createdBy":{"maxLength":255,"type":"string","description":"ФИО создателя новости","example":"Адоньев Валерий Сергеевич"},"modifiedBy":{"maxLength":255,"type":"string","description":"ФИО последнего редактора новости","example":"Адоньев Валерий Сергеевич"},"content":{"type":"string","maxLength":8192,"description":"Json/markdown файл с контентом"},"isLiked":{"type":"boolean","description":"Состояние лайка"},"tags":{"maxItems":1024,"type":"array","items":{"type":"string","maxLength":255,"example":"Игры"}},"availableComments":{"type":"boolean","description":"Включен/выключен показ комментариев и их количество"},"availableLikes":{"type":"boolean","description":"Включен/выключен показ количества лайков и возможность их поставить"},"availableViews":{"type":"boolean","description":"Включен/выключен показ количества просмотров новости"},"createdAt":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата создания новостной статьи"},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата начала публикации новостной статьи"},"modifiedAt":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата обновления публикации новостной статьи"},"amountLikes":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество лайков","example":111},"amountViews":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество просмотров","example":122},"amountComments":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество комментариев","example":10}}},"NewsArticleAdmin":{"required":["header","rubricId","rubricName","departmentName","departmentId","dtStart"],"type":"object","additionalProperties":false,"properties":{"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"stateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса новости","example":"Опубликована"},"stateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"},"subStateId":{"type":"string","maxLength":255,"description":"Id статуса публикации на главной","example":"REQUEST"},"subStateName":{"maxLength":255,"type":"string","description":"Наименовоние статуса публикации на главной","example":"Опубликована"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":1},"rubricName":{"maxLength":255,"type":"string","description":"Наименование рубрики","example":"Игры"},"departmentId":{"description":"id департамента","type":"integer","minimum":-999999999999999,"maximum":999999999999999,"example":21212331},"departmentName":{"maxLength":255,"type":"string","description":"Наименование департамента"},"createdBy":{"maxLength":255,"type":"string","description":"ФИО создателя новости","example":"Адоньев Валерий Сергеевич"},"modifiedBy":{"maxLength":255,"type":"string","description":"ФИО последнего редактора новости","example":"Адоньев Валерий Сергеевич"},"content":{"type":"string","maxLength":8192,"description":"Json/markdown файл с контентом"},"tags":{"maxItems":1024,"type":"array","items":{"type":"string","maxLength":255,"example":"Игры"}},"recommendations":{"maxItems":9,"type":"array","items":{"type":"string","maxLength":1024}},"availableComments":{"type":"boolean","description":"Включен/выключен показ комментариев и их количество"},"availableLikes":{"type":"boolean","description":"Включен/выключен показ количества лайков и возможность их поставить"},"availableViews":{"type":"boolean","description":"Включен/выключен показ количества просмотров новости"},"createdAt":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата создания новостной статьи"},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата начала публикации новостной статьи"},"dtEnd":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата завершения публикации новостной статьи"},"modifiedAt":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата обновления публикации новостной статьи"}}},"Recommendations":{"required":["id","header"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"},"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"amountLikes":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество лайков","example":111},"amountViews":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество просмотров","example":122},"amountComments":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество комментариев","example":10}}},"PostNews":{"required":["header","bannerId","rubricId","departmentId","dtStart","stateId"],"type":"object","additionalProperties":false,"properties":{"header":{"maxLength":255,"type":"string","description":"Заголовок новостной статьи","example":"Киберспортивный турнир стартует 22.02"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id обложки новости","example":"123e4567-e89b-12d3-a456-426655440000"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":1},"departmentId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id департамента","example":13},"contentJson":{"type":"string","maxLength":8192,"description":"Json файл с контентом"},"contentMarkdown":{"type":"string","maxLength":8192,"description":"Markdown файл с контентом"},"tags":{"maxItems":1024,"type":"array","items":{"type":"string","maxLength":1024,"example":"Игры"}},"recommendations":{"maxItems":9,"type":"array","items":{"type":"string","maxLength":1024}},"availableComments":{"type":"boolean","description":"Включен/выключен показ комментариев и их количество"},"availableLikes":{"type":"boolean","description":"Включен/выключен показ количества лайков и возможность их поставить"},"availableViews":{"type":"boolean","description":"Включен/выключен показ количества просмотров новости"},"dtEnd":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата завершения публикации новостной статьи"},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата начала публикации новостной статьи"},"stateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"},"subStateId":{"type":"string","maxLength":255,"description":"Id статуса публикации на главной","example":"REQUEST"}}},"PostStates":{"type":"object","additionalProperties":false,"required":["subStateId"],"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id новостной статьи","example":"123e4567-e89b-12d3-a456-426655440000"},"subStateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"}}},"Likes":{"type":"object","additionalProperties":false,"required":["isLiked","id"],"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"Id объекта","example":"123e4567-e89b-12d3-a456-426655440000"},"isLiked":{"type":"boolean","description":"Состояние лайка"}}},"UserDepartment":{"required":["id","name"],"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id департамента пользователя","example":13},"name":{"maxLength":255,"type":"string","description":"Наименование департамента","example":"Технический департамент"}}},"Departments":{"type":"array","maxItems":1000,"items":{"required":["id","name"],"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id департамента","example":12222},"name":{"maxLength":255,"type":"string","description":"Наименование департамента","example":"Административный департамент"}}}},"States":{"required":["id","name"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":255,"type":"string","description":"Id статуса новости","example":"DRAFT"},"name":{"maxLength":255,"type":"string","description":"Наименование статуса","example":"Опубликована"}}},"SubStates":{"required":["id","name"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":255,"type":"string","description":"Id статуса публикации на главной","example":"REQUEST"},"name":{"maxLength":255,"type":"string","description":"Наименование статуса","example":"Запрос репоста"}}},"Rubrics":{"required":["id","name"],"type":"object","additionalProperties":false,"properties":{"id":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id рубрики","example":12},"name":{"maxLength":255,"type":"string","description":"Наименование рубрики","example":"Игры"}}},"CommentsInfo":{"type":"object","additionalProperties":false,"required":["results","total"],"properties":{"results":{"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/Comments"}},"total":{"maximum":999999999999999,"minimum":-999999999999999,"type":"integer","format":"int64"}}},"Comments":{"type":"object","required":["id","text","userId","userName","createdAt","amountLikes","isLike","subComments"],"additionalProperties":false,"properties":{"id":{"maxLength":64,"type":"string","format":"text","description":"Id комментария","example":"123e4567-e89b-12d3-a456-426655440000"},"userId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id пользователя, создавшего комментарий","example":4091387},"userName":{"maxLength":255,"type":"string","description":"ФИО пользователя, создавшего комментарий","example":"Адоньев Валерий Сергеевич"},"createdAt":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999,"example":1709462734000,"description":"Дата создания комментария"},"amountLikes":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Количество лайков","example":111},"isLike":{"type":"boolean","description":"Состояние лайка"},"text":{"maxLength":1024,"type":"string","description":"Текст комментария","example":"Новость огонь!"},"subComments":{"type":"boolean","description":"Есть или нет саб комментарии"}}},"PostComments":{"required":["text","objectId"],"type":"object","additionalProperties":false,"properties":{"objectId":{"maxLength":64,"type":"string","format":"text","description":"Id объекта","example":"123e4567-e89b-12d3-a456-426655440000"},"text":{"maxLength":1024,"type":"string","description":"Текст комментария","example":"Крутая новость"}}},"PutComments":{"required":["text"],"type":"object","additionalProperties":false,"properties":{"text":{"maxLength":1024,"type":"string","description":"Текст комментария","example":"Крутая новость"}}},"UserRoles":{"required":["userId","roles","userDepartment"],"type":"object","additionalProperties":false,"properties":{"roles":{"type":"array","description":"Массив с ролями, может быть пустым в случае если у сотрудника только роль Пользователь","maxItems":1000,"items":{"maxLength":255,"type":"string","example":"prbs_news_resource_chief_editor"}},"userId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999,"description":"Id пользователя","example":4091387},"userDepartment":{"$ref":"#/components/schemas/UserDepartment"}}}}},"x-tyk-configuration":{"api_id":"646f2433d56b6d88dbddaeec","application":{"version":"v1","provider_rate_limit":{"DSO":{"per":1,"rate":40},"IFT":{"per":1,"rate":40},"PREPROD":{"per":1,"rate":40},"PROD":{"per":1,"rate":40}},"oas3_validate_response":false,"oas3_validate_request":false,"mw_enable_validate_header_limit_request":false,"mw_enable_validate_header_limit_response":false,"enable_middlewares":true,"target_url":{"DSO":"https://prbs-newsresource-api.apps.ds5-genr03.corp.dev.vtb/ui-api-web/cross/prbs/newsresource/v1","IFT":"https://prbs-newsresource-api.apps.ss5-genr02.test.vtb.ru/ui-api-web/cross/prbs/newsresource/v1","PREPROD":"https://prbs-newsresource-api.apps.rs5-genr02.test.vtb.ru/ui-api-web/cross/prbs/newsresource/v1","PROD":"https://prbs-newsresource-api.apps.ps5-genr02.region.vtb.ru/ui-api-web/cross/prbs/newsresource/v1"},"name":"1881.prbs-newsresource-s-rest-v1","providerRisId":"1881","providerMnemonic":"prbs","listen_path":"/ui-api-web/cross/prbs/newsresource/v1","strip_listen_path":true,"provider_type":"internal","auth_type":"EPA","epa_default_policy":"646f3f69b09d4586263a78d0","enforced_timeout":{"DSO":40,"IFT":40,"PREPROD":40,"PROD":40},"global_size_limit":1048576,"mask_log":[{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/news"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rq":["*"],"rs":{"200":["*"],"201":["*"]}},"method":"POST","path":"/news"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/news/{id}"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/news/{id}/recommendations"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/news/widget"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/departments"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/departments/userDepartment"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/states"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/subStates"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/rubrics"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rq":["*"],"rs":{"200":["*"],"201":["*"]}},"method":"POST","path":"/likes"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/comments/{id}"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rq":["*"],"rs":{"200":["*"],"201":["*"]}},"method":"PUT","path":"/comments/{id}"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rq":["*"],"rs":{"200":["*"],"201":["*"]}},"method":"DELETE","path":"/comments/{id}"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rq":["*"],"rs":{"200":["*"],"201":["*"]}},"method":"POST","path":"/comments"},{"header":{"rq":["X-TYK-API-KEY","Authorization","Cookie"]},"json":{"rs":{"200":["*"]}},"method":"GET","path":"/roles"}],"rq_validate_json":[{"path":"/news","method":"POST","error_response_code":422,"properties":{"type":"object","additionalProperties":false,"required":["header","rubricId","department","dtStart","bannerId","stateId"],"properties":{"header":{"maxLength":255,"type":"string"},"bannerId":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"rubricId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999},"departmentId":{"type":"integer","minimum":-999999999999999,"maximum":999999999999999},"contentJson":{"type":"string","maxLength":8192},"contentMarkdown":{"type":"string","maxLength":8192},"tags":{"maxItems":1024,"type":"array","items":{"type":"string","maxLength":1024}},"recommendations":{"maxItems":9,"type":"array","items":{"type":"string","maxLength":1024}},"availableComments":{"type":"boolean"},"availableLikes":{"type":"boolean"},"availableViews":{"type":"boolean"},"dtEnd":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999},"dtStart":{"type":"integer","format":"int64","minimum":-999999999999999,"maximum":999999999999999},"stateId":{"type":"string","description":"Id статуса новости","example":"DRAFT"},"subStateId":{"type":"string","maxLength":255,"description":"Id статуса публикации на главной","example":"REQUEST"}}}},{"path":"/likes","method":"POST","error_response_code":422,"properties":{"type":"object","additionalProperties":false,"required":["isLike","id"],"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"isLike":{"type":"boolean"}}}},{"path":"/comments/{id}","method":"PUT","error_response_code":422,"properties":{"required":["text"],"type":"object","additionalProperties":false,"properties":{"text":{"maxLength":1024,"type":"string"}}}},{"path":"/comments","method":"POST","error_response_code":422,"properties":{"required":["text","id"],"type":"object","additionalProperties":false,"properties":{"id":{"maxLength":36,"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"text":{"maxLength":1024,"type":"string"}}}}]}}}