Skip to content

Commit d1b24d4

Browse files
authored
fix: add missing pagination parameters to migrationpagination package (#721)
1 parent 5ebc1cb commit d1b24d4

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

pagination/migrationpagination/header.go

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ package migrationpagination
55

66
// swagger:model mixedPaginationRequestParameters
77
type RequestParameters struct {
8-
// Items per Page
8+
// Deprecated Items per Page
9+
//
10+
// DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future.
911
//
1012
// This is the number of items per page.
1113
//
@@ -16,7 +18,9 @@ type RequestParameters struct {
1618
// max: 1000
1719
PerPage int `json:"per_page"`
1820

19-
// Pagination Page
21+
// Deprecated Pagination Page
22+
//
23+
// DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future.
2024
//
2125
// This value is currently an integer, but it is not sequential. The value is not the page number, but a
2226
// reference. The next page can be any number and some numbers might return an empty list.
@@ -28,6 +32,29 @@ type RequestParameters struct {
2832
// required: false
2933
// in: query
3034
Page int `json:"page"`
35+
36+
// Page Size
37+
//
38+
// This is the number of items per page to return. For details on pagination please head over to the
39+
// [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
40+
//
41+
// required: false
42+
// in: query
43+
// default: 250
44+
// min: 1
45+
// max: 500
46+
PageSize int `json:"page_size"`
47+
48+
// Next Page Token
49+
//
50+
// The next page token. For details on pagination please head over to the
51+
// [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
52+
//
53+
// required: false
54+
// in: query
55+
// default: 1
56+
// min: 1
57+
PageToken string `json:"page_token"`
3158
}
3259

3360
// Pagination Response Header

pagination/pagepagination/header.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ type RequestParameters struct {
3535

3636
// Items per Page
3737
//
38-
// This is the number of items per page to return.
39-
// For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
38+
// This is the number of items per page to return. For details on pagination please head over to the
39+
// [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
4040
//
4141
// required: false
4242
// in: query
@@ -47,8 +47,8 @@ type RequestParameters struct {
4747

4848
// Next Page Token
4949
//
50-
// The next page token.
51-
// For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
50+
// The next page token. For details on pagination please head over to the
51+
// [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
5252
//
5353
// required: false
5454
// in: query

0 commit comments

Comments
 (0)