Skip to content

Conversation

@gas-coder
Copy link
Owner

Добавлен файл rest_api.yaml

Добавлен файл rest_api.yaml
- description
- photoUrls
- location
responses:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

500 не вижу здесь и ниже


/api/v1/users/{id}/subscribes:
post:
summary: Подписаться или отписаться от путешественника

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы отписку delet-ом делал

404:
description: Пользователь не найден

/api/v1/posts/{id}/like:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В REST не принято в URI использовать глаголы - like


/api/v1/posts/{id}/like:
post:
summary: Поставить или убрать лайк с поста

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Аналогично про delete

404:
description: Пост не найден

/api/v1/feed/global:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем тут global?

401:
description: Пользователь не авторизован

/api/v1/destinations/popular:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем popular? Если хочется делать признаки - это должно быть параметром запроса

400:
description: Некорректные параметры запроса

/api/v1/destinations/{id}/posts:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Снова ручка получения постов - я бы сделал одну обобщенную ручку получения постов и конфигурировал бы ее с использованием параметров запроса

401:
description: Пользователь не авторизован

components:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А как комментарии и реакции получать, не будем же мы их грузить вместе с постами? А также как медиа данные грузить?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants