Skip to content

Conversation

@Prajwalprakash3722
Copy link
Member

@Prajwalprakash3722 Prajwalprakash3722 commented Feb 12, 2024

  • Adds Test and support for Paging feature

also I ran default formatting in Intellij not sure why it has added/removed line breaks

@Prajwalprakash3722 Prajwalprakash3722 linked an issue Feb 12, 2024 that may be closed by this pull request
@sonarqubecloud
Copy link

Copy link
Member

@chrisvrose chrisvrose left a comment

Choose a reason for hiding this comment

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

What's the behaviour on the default API? Does it affect how the list API is called without arguments?

var eventsList = eventsService.list();
assertThat(eventsList).isNotNull().singleElement().isSameAs(event);
void testList() {
Pageable pageable = Pageable.ofSize(20).withPage(0);
Copy link
Member

Choose a reason for hiding this comment

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

Can you use default Page size? instead of 20?

Copy link
Member Author

Choose a reason for hiding this comment

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

Default is 20

@Prajwalprakash3722
Copy link
Member Author

Unless you need additional objects in a single call, you can include query parameters like:

  • Size
  • Page
  • Sort

If no parameters are provided, it will return 20 events per request sorted in ascending order as eventStartDate, and you can request subsequent events by adding a page query. The data is returned in the content field, and a few more fields are added to the ResultDTO.

@chrisvrose
Copy link
Member

Can we make the page size if both size and offset not applied as infinite(-1)?
This way we keep the same API meaning and not break the contract too much?

@Prajwalprakash3722
Copy link
Member Author

That should be possible let me check

@Prajwalprakash3722
Copy link
Member Author

seems like there is no update on this from my side, I shall take this weekend to look at this issue

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.

Implement Pagination Support

3 participants