File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
packages/models-library/src/models_library/api_schemas_catalog Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 1- from typing import Any , Literal
1+ from typing import Annotated , Any , Literal
22
33from pydantic import BaseModel , ConfigDict , Field
44from pydantic .config import JsonDict
1313
1414
1515class ServicePortGet (BaseModel ):
16- key : str = Field (
17- ...,
18- description = "Port identifier name" ,
19- pattern = PUBLIC_VARIABLE_NAME_RE ,
20- title = "Key name" ,
21- )
16+ key : Annotated [
17+ str ,
18+ Field (
19+ description = "Port identifier name" ,
20+ pattern = PUBLIC_VARIABLE_NAME_RE ,
21+ title = "Key name" ,
22+ ),
23+ ]
2224 kind : Literal ["input" , "output" ]
2325 content_media_type : str | None = None
24- content_schema : dict [str , Any ] | None = Field (
25- None ,
26- description = "jsonschema for the port's value. SEE https://json-schema.org/understanding-json-schema/" ,
27- )
26+ content_schema : Annotated [
27+ dict [str , Any ] | None ,
28+ Field (
29+ description = "jsonschema for the port's value. SEE https://json-schema.org/understanding-json-schema/" ,
30+ ),
31+ ] = None
2832
2933 @staticmethod
3034 def _update_json_schema_extra (schema : JsonDict ) -> None :
You can’t perform that action at this time.
0 commit comments