Skip to content

Commit 96144b5

Browse files
committed
schemas
1 parent 2d40f7b commit 96144b5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

services/web/server/src/simcore_service_webserver/catalog/_controller_rest_schemas.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import urllib.parse
33
from collections.abc import Callable
44
from dataclasses import dataclass
5-
from typing import Any, Final
5+
from typing import Annotated, Any, Final
66

77
from aiocache import cached # type: ignore[import-untyped]
88
from aiohttp import web
@@ -181,7 +181,7 @@ class ServicePathParams(BaseModel):
181181

182182
@field_validator("service_key", mode="before")
183183
@classmethod
184-
def ensure_unquoted(cls, v):
184+
def _ensure_unquoted(cls, v):
185185
# NOTE: this is needed as in pytest mode, the aiohttp server does not seem to unquote automatically
186186
if v is not None:
187187
return urllib.parse.unquote(v)
@@ -200,16 +200,16 @@ class ServiceInputsPathParams(ServicePathParams):
200200

201201

202202
class FromServiceOutputQueryParams(BaseModel):
203-
from_service_key: ServiceKey = Field(..., alias="fromService")
204-
from_service_version: ServiceVersion = Field(..., alias="fromVersion")
205-
from_output_key: ServiceOutputKey = Field(..., alias="fromOutput")
203+
from_service_key: Annotated[ServiceKey, Field(alias="fromService")]
204+
from_service_version: Annotated[ServiceVersion, Field(alias="fromVersion")]
205+
from_output_key: Annotated[ServiceOutputKey, Field(alias="fromOutput")]
206206

207207

208208
class ServiceOutputsPathParams(ServicePathParams):
209209
output_key: ServiceOutputKey
210210

211211

212212
class ToServiceInputsQueryParams(BaseModel):
213-
to_service_key: ServiceKey = Field(..., alias="toService")
214-
to_service_version: ServiceVersion = Field(..., alias="toVersion")
215-
to_input_key: ServiceInputKey = Field(..., alias="toInput")
213+
to_service_key: Annotated[ServiceKey, Field(alias="toService")]
214+
to_service_version: Annotated[ServiceVersion, Field(alias="toVersion")]
215+
to_input_key: Annotated[ServiceInputKey, Field(alias="toInput")]

0 commit comments

Comments
 (0)