Skip to content

Commit

Permalink
apply datetime converter in ItemCollection endpoint model (#667)
Browse files Browse the repository at this point in the history
* apply datetime converter in ItemCollection endpoint model

* update changelog
  • Loading branch information
StijnCaerts authored Apr 22, 2024
1 parent 2e14348 commit dddd710
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

* Apply datetime converter in ItemCollection endpoint model ([#667](https://github.com/stac-utils/stac-fastapi/pull/667))

## [2.5.2] - 2024-04-19

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion stac_fastapi/api/stac_fastapi/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
BaseSearchGetRequest,
BaseSearchPostRequest,
str2bbox,
str_to_interval,
)


Expand Down Expand Up @@ -127,7 +128,7 @@ class ItemCollectionUri(CollectionUri):

limit: int = attr.ib(default=10)
bbox: Optional[BBox] = attr.ib(default=None, converter=str2bbox)
datetime: Optional[DateTimeType] = attr.ib(default=None)
datetime: Optional[DateTimeType] = attr.ib(default=None, converter=str_to_interval)


class POSTTokenPagination(BaseModel):
Expand Down

0 comments on commit dddd710

Please sign in to comment.