JsonApiOptions¶
class in JsonApiToolkit.Configuration
Configuration options for JsonApiToolkit query processing and security limits.
Constructors¶
JsonApiOptions()¶
Properties¶
MaxFilters : int¶
Maximum number of individual filter conditions allowed in a query. Default: 50. Set to int.MaxValue to disable.
MaxFilterGroups : int¶
Maximum number of logical filter groups (OR/NOT blocks) allowed. Default: 10. Set to int.MaxValue to disable.
MaxFilterDepth : int¶
Maximum nesting depth for filter groups. Default: 3. Set to int.MaxValue to disable.
MaxFilterValueLength : int¶
Maximum length for a single filter value string. Default: 1000. Set to int.MaxValue to disable.
MaxIncludeDepth : int¶
Maximum include depth (e.g., "author.posts.comments" = depth 3). Default: 3. Set to int.MaxValue to disable.
MaxPageSize : int¶
Maximum page size allowed. Requests exceeding this are clamped. Default: 100.
DefaultPageSize : int¶
Default page size when not specified in request. Default: 10.
StrictPagination : bool¶
When true, returns 400 Bad Request for invalid pagination values instead of silently clamping. Invalid page numbers (less than 1) and page sizes (less than 1 or exceeding MaxPageSize) will return errors. Default: false (clamp for backwards compatibility).
StrictQueryValidation : bool¶
When true, returns 400 Bad Request instead of silently ignoring invalid query parameters: unknown filter fields, unconvertible filter values, unknown filter operators, unknown sort fields, malformed filter keys, unsupported filter group shapes (filter[and] and nested groups), and bracket-syntax include filters whose relationship is not included. Default: false (log and skip for backwards compatibility).
PreserveQueryInPaginationLinks : bool¶
When true, pagination links (first/last/prev/next) preserve the request's full query string (filter, sort, include, fields) with only the page parameters replaced. Default: false (links are rebuilt from the bare path and drop all other query parameters, for backwards compatibility).
EnableDatabaseProjection : bool¶
When true, applies database-level column filtering via EF Core Select() projection when fields[type] is specified in the request. Only fetches requested columns from the database instead of loading full entities and filtering in memory. Not compatible with NativeAOT compilation. Default: false.