diff --git a/dockerfiles/Dockerfile.raster b/dockerfiles/Dockerfile.raster index ce3f1b8..dafa06e 100644 --- a/dockerfiles/Dockerfile.raster +++ b/dockerfiles/Dockerfile.raster @@ -1,6 +1,6 @@ ARG PYTHON_VERSION=3.12 -FROM bitnami/python:${PYTHON_VERSION} +FROM python:${PYTHON_VERSION} RUN apt update && apt upgrade -y \ && apt install curl -y \ && rm -rf /var/lib/apt/lists/* diff --git a/dockerfiles/Dockerfile.stac b/dockerfiles/Dockerfile.stac index d8be102..e23645b 100644 --- a/dockerfiles/Dockerfile.stac +++ b/dockerfiles/Dockerfile.stac @@ -1,6 +1,6 @@ ARG PYTHON_VERSION=3.12 -FROM bitnami/python:${PYTHON_VERSION} +FROM python:${PYTHON_VERSION} RUN apt update && apt upgrade -y \ && apt install curl -y \ && rm -rf /var/lib/apt/lists/* diff --git a/dockerfiles/Dockerfile.vector b/dockerfiles/Dockerfile.vector index 51120c2..80c59cb 100644 --- a/dockerfiles/Dockerfile.vector +++ b/dockerfiles/Dockerfile.vector @@ -1,6 +1,6 @@ ARG PYTHON_VERSION=3.12 -FROM bitnami/python:${PYTHON_VERSION} +FROM python:${PYTHON_VERSION} RUN apt update && apt upgrade -y \ && apt install curl -y \ && rm -rf /var/lib/apt/lists/* diff --git a/runtimes/eoapi/stac/eoapi/stac/app.py b/runtimes/eoapi/stac/eoapi/stac/app.py index 0e660d6..49f3010 100644 --- a/runtimes/eoapi/stac/eoapi/stac/app.py +++ b/runtimes/eoapi/stac/eoapi/stac/app.py @@ -6,11 +6,11 @@ import jinja2 from eoapi.auth_utils import OpenIdConnectAuth, OpenIdConnectSettings from fastapi import FastAPI -from fastapi.responses import ORJSONResponse from stac_fastapi.api.models import ( CollectionUri, ItemCollectionUri, ItemUri, + JSONResponse, create_get_request_model, create_post_request_model, create_request_model, @@ -82,7 +82,7 @@ TransactionExtension( client=TransactionsClient(), settings=settings, - response_class=ORJSONResponse, + response_class=JSONResponse, ) ) application_extensions.append( @@ -220,7 +220,7 @@ async def lifespan(app: FastAPI): collections_get_request_model=collections_get_model, search_get_request_model=search_get_model, search_post_request_model=search_post_model, - response_class=ORJSONResponse, + response_class=JSONResponse, middlewares=middlewares, ) app = api.app diff --git a/runtimes/eoapi/stac/eoapi/stac/client.py b/runtimes/eoapi/stac/eoapi/stac/client.py index 9f8af38..9d4b719 100644 --- a/runtimes/eoapi/stac/eoapi/stac/client.py +++ b/runtimes/eoapi/stac/eoapi/stac/client.py @@ -547,7 +547,7 @@ async def item_collection( if fields.include or fields.exclude: return JSONResponse(item_collection) # type: ignore - return ItemCollection(**item_collection) + return item_collection # NOTE: We can't use `super.get_search(...)` because of the `fields` extension # which, when used, might return a JSONResponse directly instead of a ItemCollection (TypeDict) @@ -657,7 +657,7 @@ async def get_search( if fields.include or fields.exclude: return JSONResponse(item_collection) # type: ignore - return ItemCollection(**item_collection) + return item_collection # NOTE: We can't use `super.post_search(...)` because of the `fields` extension # which, when used, might return a JSONResponse directly instead of a ItemCollection (TypeDict) @@ -717,4 +717,4 @@ async def post_search( if fields.include or fields.exclude: return JSONResponse(item_collection) # type: ignore - return ItemCollection(**item_collection) + return item_collection diff --git a/runtimes/eoapi/stac/pyproject.toml b/runtimes/eoapi/stac/pyproject.toml index 04f4dbc..3472365 100644 --- a/runtimes/eoapi/stac/pyproject.toml +++ b/runtimes/eoapi/stac/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ ] dynamic = ["version"] dependencies = [ + "orjson", "stac-fastapi.pgstac>=5.0,<5.1", "jinja2>=2.11.2,<4.0.0", "starlette-cramjam>=0.4,<0.5",