diff --git a/core/src/main/java/greencity/controller/EventController.java b/core/src/main/java/greencity/controller/EventController.java index 737a95d14..dfef735cc 100644 --- a/core/src/main/java/greencity/controller/EventController.java +++ b/core/src/main/java/greencity/controller/EventController.java @@ -179,7 +179,11 @@ public ResponseEntity getEvent( public ResponseEntity> getEvents( @Parameter(hidden = true) Pageable pageable, @RequestParam(required = false, name = "user-id") Long userId, - FilterEventDto filterEventDto) { + @Schema( + description = "Filters for events", + name = "FilterEventDto", + type = "object", + example = FilterEventDto.defaultJson) FilterEventDto filterEventDto) { if (filterEventDto != null && filterEventDto.getStatuses() != null) { validateStatusesRequireUserId(filterEventDto.getStatuses(), userId); } diff --git a/service-api/src/main/java/greencity/dto/filter/FilterEventDto.java b/service-api/src/main/java/greencity/dto/filter/FilterEventDto.java index 4320a709b..e6c35f90d 100644 --- a/service-api/src/main/java/greencity/dto/filter/FilterEventDto.java +++ b/service-api/src/main/java/greencity/dto/filter/FilterEventDto.java @@ -23,4 +23,17 @@ public class FilterEventDto { private EventType type; private ZonedDateTime from; private ZonedDateTime to; + + public static final String defaultJson = """ + { + "time": null, + "cities": [], + "statuses": [], + "tags": [], + "title": null, + "type": null, + "from": null, + "to": null + } + """; }