-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: filters can be dynamically generated per route (#196)
Filters are now completely configurable per-route. There's a dependency generator that will allow you to enable specific feature types per endpoint. Here are the currently enabled configurable parameters: ```py id_filter: NotRequired[type[UUID | int]] """Indicates that the id filter should be enabled. When set, the type specified will be used for the :class:`CollectionFilter`.""" id_field: NotRequired[str] """The field on the model that stored the primary key or identifier.""" sort_field: NotRequired[str] """The default field to use for the sort filter.""" sort_order: NotRequired[SortOrder] """The default order to use for the sort filter.""" pagination_type: NotRequired[Literal["limit_offset"]] """When set, pagination is enabled based on the type specified.""" pagination_size: NotRequired[int] """The size of the pagination.""" search: NotRequired[bool] """When set, search is enabled.""" search_ignore_case: NotRequired[bool] """When set, search is case insensitive by default.""" created_at: NotRequired[bool] """When set, created_at filter is enabled.""" updated_at: NotRequired[bool] """When set, updated_at filter is enabled.""" ```
- Loading branch information
Showing
15 changed files
with
812 additions
and
437 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.