Skip to content

Conversation

@russuAV
Copy link
Owner

@russuAV russuAV commented Jun 17, 2025

• реализовано создание запроса на добавление вещи и ответ на него
• вынесена валидация входящих запросов в gateway
• добавлены тесты

	• вынесена валидация входящих запросов в gateway
	• добавлены тесты
Copy link

@Sla-als Sla-als left a comment

Choose a reason for hiding this comment

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

Есть небольшие замечания

private static final String API_PREFIX = "/bookings";


public BookingClient(@Value("${shareit-server.url}") String serverUrl, RestTemplateBuilder builder) {
Copy link

Choose a reason for hiding this comment

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

Лучше переименовать свойство в application.properties и в @value в shareit.server.url (с точкой).

Copy link

Choose a reason for hiding this comment

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

  • @notblank уже включает проверку на null, поэтому @NotNull избыточен.
  • нет аннотации @future / @FutureOrPresent на даты, хотя вы проверяете только, что end > start -
    нужно добавить @FutureOrPresent/@future на start/end, если хотите запретить прошлые даты.

	• переименовано свойство в application.properties и в @value на shareit.server.url
	• добавлена аннотация @future для проверки введенных пользователем дат бронирования
@russuAV russuAV merged commit 421210e into main Jul 11, 2025
2 checks passed
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