Skip to content

Commit

Permalink
#103 - adding schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pveeckhout committed Aug 30, 2023
1 parent 5dfa58d commit a512ec5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.edpn.backend.trade.adapter.web.dto.filter;

import io.edpn.backend.trade.application.dto.web.filter.PageFilterDto;
import io.swagger.v3.oas.annotations.media.Schema;

@Schema(name = "PageFilterDto")
public record RestPageFilterDto(
int size,
int page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
public class RestPageFilterDtoMapper implements PageFilterDtoMapper {
@Override
public PageFilter map(PageFilterDto pageFilterDto) {
PageFilter.PageFilterBuilder bulder = getDefaultFilterBuilder();
PageFilter.PageFilterBuilder builder = getDefaultFilterBuilder();
if (pageFilterDto.size() > 0) {
bulder.size(pageFilterDto.size());
builder.size(pageFilterDto.size());
}
if (pageFilterDto.page() >= 0) {
bulder.page(pageFilterDto.page());
builder.page(pageFilterDto.page());
}
return bulder.build();
return builder.build();
}

@Override
Expand Down

0 comments on commit a512ec5

Please sign in to comment.