Skip to content

Commit e1aedca

Browse files
authored
Fix pagination response and add docu (#196)
The original PR added the wrong field `pagination_parameters` twice, it should have been `pagination_info` in the response message.
2 parents e1f0978 + cb019ff commit e1aedca

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

RELEASE_NOTES.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
## Summary
44

5-
This is just a minor update that changes the `Dispatch` message structure a bit.
5+
<!-- Here goes a general summary of what this release is about -->
66

77
## Upgrading
88

9-
* `DispatchDetail` is now `Dispatch`
10-
* `Dispatch` became `DispatchData`
11-
* Member part of `Dispatch` is now the new message `DispatchMedatata`
9+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10+
11+
## New Features
12+
13+
<!-- Here goes the main new features and examples or instructions on how to use them -->
14+
15+
## Bug Fixes
16+
17+
* Fixed pagination fields in the response (`pagination_params` -> `pagination_info`)

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,12 @@ message ListMicrogridDispatchesRequest {
521521
// Sorting options for the result
522522
SortOptions sort_options = 3;
523523

524-
// Pagination parameters
524+
// Pagination Parameters
525+
// page_size: Amount of items to return per page. Should only be provided in the first request.
526+
// page_token: Cursor to specify which page to return. Should not be set in the first request.
527+
// Should be populated in subsequent requests by the `next_page_token` found in
528+
// the `pagination_info` in the response.
529+
// The tokens stays valid indefinitely.
525530
frequenz.api.common.v1.pagination.PaginationParams pagination_params = 4;
526531
}
527532

@@ -530,10 +535,14 @@ message ListMicrogridDispatchesResponse {
530535
// The dispatches
531536
repeated Dispatch dispatches = 1;
532537

533-
// Pagination parameters
534-
frequenz.api.common.v1.pagination.PaginationParams pagination_params = 4;
538+
// Pagination Info
539+
// total_items: Total amount of entries found by the list request.
540+
// next_page_token: Token that can be used to request the next page.
541+
// Will be unset if no further pages exist.
542+
frequenz.api.common.v1.pagination.PaginationInfo pagination_info = 2;
535543
}
536544

545+
537546
// Message to create a new dispatch with the given attributes
538547
message CreateMicrogridDispatchRequest {
539548
// The microgrid identifier

0 commit comments

Comments
 (0)