Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 55 additions & 3 deletions openapi/ga/individual/platform.openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 55 additions & 3 deletions openapi/ga/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 55 additions & 3 deletions openapi/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions packages/nmp_common/src/nmp/common/entities/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,42 @@ class StringFilter(Filter):
protected_namespaces=(),
populate_by_name=True, # Accept both "eq" and "$eq" as input
)


class NumberFilter(Filter):
gte: Optional[float] = Field(
None,
alias="$gte",
serialization_alias="$gte",
description="Filter for results greater than or equal to this value.",
)
lte: Optional[float] = Field(
None,
alias="$lte",
serialization_alias="$lte",
description="Filter for results less than or equal to this value.",
)
gt: Optional[float] = Field(
None,
alias="$gt",
serialization_alias="$gt",
description="Filter for results greater than this value.",
)
lt: Optional[float] = Field(
None,
alias="$lt",
serialization_alias="$lt",
description="Filter for results less than this value.",
)
eq: Optional[float] = Field(
None,
alias="$eq",
serialization_alias="$eq",
description="Filter for results equal to this value.",
)

model_config = ConfigDict(
extra="forbid",
protected_namespaces=(),
populate_by_name=True, # Accept both "gte" and "$gte" as input
)
Loading
Loading