-
Notifications
You must be signed in to change notification settings - Fork 0
Create rest_api.yml #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Добавлен файл rest_api.yaml
| - description | ||
| - photoUrls | ||
| - location | ||
| responses: |
There was a problem hiding this comment.
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: Подписаться или отписаться от путешественника |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: Поставить или убрать лайк с поста |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Снова ручка получения постов - я бы сделал одну обобщенную ручку получения постов и конфигурировал бы ее с использованием параметров запроса
| 401: | ||
| description: Пользователь не авторизован | ||
|
|
||
| components: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А как комментарии и реакции получать, не будем же мы их грузить вместе с постами? А также как медиа данные грузить?
Добавлен файл rest_api.yaml