diff --git a/toucan_connectors/http_api/pagination_configs.py b/toucan_connectors/http_api/pagination_configs.py index cf5ac0b27..38401d940 100644 --- a/toucan_connectors/http_api/pagination_configs.py +++ b/toucan_connectors/http_api/pagination_configs.py @@ -38,8 +38,6 @@ class NoopPaginationConfig(PaginationConfig): Useful for connectors that can return all results at once. """ - kind: Literal["NoopPaginationConfig"] = Field("NoopPaginationConfig", **UI_HIDDEN) - def apply_pagination_to_data_source(self, data_source: HttpAPIDataSource) -> HttpAPIDataSource: return data_source @@ -54,7 +52,7 @@ def get_error_status_whitelist(self) -> list[str] | None: class OffsetLimitPaginationConfig(PaginationConfig): - kind: Literal["OffsetLimitPaginationConfig"] = Field("OffsetLimitPaginationConfig", **UI_HIDDEN) + kind: Literal["OffsetLimitPaginationConfig"] = "OffsetLimitPaginationConfig" offset_name: str = "offset" offset: int = Field(0, **UI_HIDDEN) limit_name: str = "limit" @@ -84,7 +82,7 @@ def get_pagination_info_filter(self) -> str | None: class PageBasedPaginationConfig(PaginationConfig): - kind: Literal["PageBasedPaginationConfig"] = Field("PageBasedPaginationConfig", **UI_HIDDEN) + kind: Literal["PageBasedPaginationConfig"] = "PageBasedPaginationConfig" page_name: str = "page" page: int = 0 per_page_name: str | None = None @@ -131,7 +129,7 @@ def get_error_status_whitelist(self) -> list[int] | None: class CursorBasedPaginationConfig(PaginationConfig): - kind: Literal["CursorBasedPaginationConfig"] = Field("CursorBasedPaginationConfig", **UI_HIDDEN) + kind: Literal["CursorBasedPaginationConfig"] = "CursorBasedPaginationConfig" cursor_name: str = "cursor" cursor: str | None = Field(None, **UI_HIDDEN) cursor_filter: str = Field(..., description=FilterSchemaDescription) @@ -165,7 +163,7 @@ def get_error_status_whitelist(self) -> list[str] | None: class HyperMediaPaginationConfig(PaginationConfig): - kind: Literal["HyperMediaPaginationConfig"] = Field("HyperMediaPaginationConfig", **UI_HIDDEN) + kind: Literal["HyperMediaPaginationConfig"] = "HyperMediaPaginationConfig" next_link_filter: str = Field(..., description=FilterSchemaDescription) next_link: str | None = None