Skip to content

Commit 06bbfdc

Browse files
authored
Merge pull request #993 from RS-PYTHON/fix/rspy600-no-warnings
RSPY600: no warnings
2 parents d3bf3ae + 6dc7d43 commit 06bbfdc

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

services/adgs/rs_server_adgs/fastapi/adgs_app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
"""Init the FastAPI application."""
1616

17+
import warnings
18+
1719
# Import the database table modules before initializing the FastAPI,
1820
# that will init the database session and create the tables.
1921
# pylint: disable=unused-import, import-outside-toplevel
@@ -24,6 +26,9 @@
2426
from rs_server_adgs.fastapi.adgs_routers import adgs_routers
2527
from rs_server_common.fastapi_app import init_app
2628

29+
# Used to supress stac_pydantic userwarnings related to serialization
30+
warnings.filterwarnings("ignore", category=UserWarning, module="stac_pydantic")
31+
2732
# Init the FastAPI application with the adgs routers.
2833
app = init_app(__version__, adgs_routers, init_db=True, router_prefix="/auxip")
2934

services/cadip/rs_server_cadip/fastapi/cadip_app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
"""Init the FastAPI application."""
1616

17+
import warnings
18+
1719
# Import the database table modules before initializing the FastAPI,
1820
# that will init the database session and create the tables.
1921
# pylint: disable=unused-import, import-outside-toplevel
@@ -24,6 +26,9 @@
2426
from rs_server_cadip.fastapi.cadip_routers import cadip_routers
2527
from rs_server_common.fastapi_app import init_app
2628

29+
# Used to supress stac_pydantic userwarnings related to serialization
30+
warnings.filterwarnings("ignore", category=UserWarning, module="stac_pydantic")
31+
2732
# Init the FastAPI application with the cadip routers.
2833
app = init_app(__version__, cadip_routers, init_db=True, router_prefix="/cadip")
2934

services/common/rs_server_common/stac_api_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ class Queryables(BaseModel):
115115
id: str = Field("", alias="$id")
116116
type: str = Field("object")
117117
title: str = Field("STAC Queryables.")
118-
schema: str = Field("http://json-schema.org/draft-07/schema#", alias="$schema") # type: ignore
118+
schema_url: str = Field("http://json-schema.org/draft-07/schema#", alias="$schema") # type: ignore
119119
properties: dict[str, Any] = Field({})
120120

121121
class Config: # pylint: disable=too-few-public-methods
122122
"""Used to overwrite BaseModel config and display aliases in model_dump."""
123123

124-
allow_population_by_field_name = True
124+
populate_by_name = True
125125

126126

127127
class QueryableField(BaseModel):

0 commit comments

Comments
 (0)