-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to stac-fastapi v3.0.0a3, remove deprecated filter fields (#269)
**Related Issue(s):** - #217 - stac-utils/stac-fastapi#642 - stac-utils/stac-fastapi@d8528ae **Description:** - Update to stac-fastapi v3.0.0a3 - Remove deprecated filter_fields - Default to returning all properties, copy stac-fastapi-pgstac behaviour for now **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog
- Loading branch information
Showing
10 changed files
with
203 additions
and
62 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: stac-fastapi-elasticsearch | ||
name: sfeos | ||
|
||
on: | ||
push: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Fields extension.""" | ||
|
||
from typing import Optional, Set | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from stac_fastapi.extensions.core import FieldsExtension as FieldsExtensionBase | ||
from stac_fastapi.extensions.core.fields import request | ||
|
||
|
||
class PostFieldsExtension(request.PostFieldsExtension): | ||
"""PostFieldsExtension.""" | ||
|
||
# Set defaults if needed | ||
# include : Optional[Set[str]] = Field( | ||
# default_factory=lambda: { | ||
# "id", | ||
# "type", | ||
# "stac_version", | ||
# "geometry", | ||
# "bbox", | ||
# "links", | ||
# "assets", | ||
# "properties.datetime", | ||
# "collection", | ||
# } | ||
# ) | ||
include: Optional[Set[str]] = set() | ||
exclude: Optional[Set[str]] = set() | ||
|
||
|
||
class FieldsExtensionPostRequest(BaseModel): | ||
"""Additional fields and schema for the POST request.""" | ||
|
||
fields: Optional[PostFieldsExtension] = Field(PostFieldsExtension()) | ||
|
||
|
||
class FieldsExtension(FieldsExtensionBase): | ||
"""Override the POST model.""" | ||
|
||
POST = FieldsExtensionPostRequest |
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