You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes PaginationExpression.PageSize to be non-nullable. It doesn't make sense to expose a page number without a size.
Note this subtly breaks IResourceDefinition.OnApplyPagination, whose return value used to distinguish between "no pagination" and "give me the default page size from options". The latter is odd, because option defaults have already been applied when entering this method.
Copy file name to clipboardExpand all lines: src/JsonApiDotNetCore/Queries/IPaginationContext.cs
+7-6
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,19 @@
3
3
namespaceJsonApiDotNetCore.Queries;
4
4
5
5
/// <summary>
6
-
/// Tracks values used for pagination, which is a combined effort from options, query string parsing and fetching the total number of rows.
6
+
/// Tracks values used for pagination, which is a combined effort from options, query string parsing, resource definition callbacks and fetching the
7
+
/// total number of rows.
7
8
/// </summary>
8
9
publicinterfaceIPaginationContext
9
10
{
10
11
/// <summary>
11
-
/// The value 1, unless specified from query string. Never null. Cannot be higher than options.MaximumPageNumber.
12
+
/// The value 1, unless overridden from query string or resource definition. Should not be higher than <see cref="IJsonApiOptions.MaximumPageNumber" />.
12
13
/// </summary>
13
14
PageNumberPageNumber{get;set;}
14
15
15
16
/// <summary>
16
-
/// The default page size from options, unless specified in query string. Can be <c>null</c>, which means no paging. Cannot be higher than
17
-
/// options.MaximumPageSize.
17
+
/// The default page size from options, unless overridden from query string or resource definition. Should not be higher than
18
+
/// <see cref="IJsonApiOptions.MaximumPageSize" />. Can be <c>null</c>, which means pagination is disabled.
18
19
/// </summary>
19
20
PageSize?PageSize{get;set;}
20
21
@@ -25,12 +26,12 @@ public interface IPaginationContext
25
26
boolIsPageFull{get;set;}
26
27
27
28
/// <summary>
28
-
/// The total number of resources. <c>null</c> when <see cref="IJsonApiOptions.IncludeTotalResourceCount" /> is set to <c>false</c>.
29
+
/// The total number of resources, or <c>null</c> when <see cref="IJsonApiOptions.IncludeTotalResourceCount" /> is set to <c>false</c>.
29
30
/// </summary>
30
31
int?TotalResourceCount{get;set;}
31
32
32
33
/// <summary>
33
-
/// The total number of resource pages. <c>null</c> when <see cref="IJsonApiOptions.IncludeTotalResourceCount" /> is set to <c>false</c> or
34
+
/// The total number of resource pages, or <c>null</c> when <see cref="IJsonApiOptions.IncludeTotalResourceCount" /> is set to <c>false</c> or
0 commit comments