22import urllib .parse
33from collections .abc import Callable
44from dataclasses import dataclass
5- from typing import Any , Final
5+ from typing import Annotated , Any , Final
66
77from aiocache import cached # type: ignore[import-untyped]
88from 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
202202class 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
208208class ServiceOutputsPathParams (ServicePathParams ):
209209 output_key : ServiceOutputKey
210210
211211
212212class 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