@@ -32,7 +32,7 @@ class EndpointCollection:
32
32
parse_errors : List [ParseError ] = field (default_factory = list )
33
33
34
34
@staticmethod
35
- def from_dict (d : Dict [str , Dict [str , Dict [str , Any ]]], / ) -> Dict [str , EndpointCollection ]:
35
+ def from_dict (d : Dict [str , Dict [str , Dict [str , Any ]]]) -> Dict [str , EndpointCollection ]:
36
36
""" Parse the openapi paths data to get EndpointCollections by tag """
37
37
endpoints_by_tag : Dict [str , EndpointCollection ] = {}
38
38
@@ -72,7 +72,7 @@ class Endpoint:
72
72
multipart_body_reference : Optional [Reference ] = None
73
73
74
74
@staticmethod
75
- def parse_request_form_body (body : Dict [str , Any ], / ) -> Optional [Reference ]:
75
+ def parse_request_form_body (body : Dict [str , Any ]) -> Optional [Reference ]:
76
76
""" Return form_body_reference """
77
77
body_content = body ["content" ]
78
78
form_body = body_content .get ("application/x-www-form-urlencoded" )
@@ -81,7 +81,7 @@ def parse_request_form_body(body: Dict[str, Any], /) -> Optional[Reference]:
81
81
return None
82
82
83
83
@staticmethod
84
- def parse_multipart_body (body : Dict [str , Any ], / ) -> Optional [Reference ]:
84
+ def parse_multipart_body (body : Dict [str , Any ]) -> Optional [Reference ]:
85
85
""" Return form_body_reference """
86
86
body_content = body ["content" ]
87
87
body = body_content .get ("multipart/form-data" )
@@ -90,7 +90,7 @@ def parse_multipart_body(body: Dict[str, Any], /) -> Optional[Reference]:
90
90
return None
91
91
92
92
@staticmethod
93
- def parse_request_json_body (body : Dict [str , Any ], / ) -> Optional [Property ]:
93
+ def parse_request_json_body (body : Dict [str , Any ]) -> Optional [Property ]:
94
94
""" Return json_body """
95
95
body_content = body ["content" ]
96
96
json_body = body_content .get ("application/json" )
@@ -169,7 +169,7 @@ class Schema:
169
169
relative_imports : Set [str ]
170
170
171
171
@staticmethod
172
- def from_dict (d : Dict [str , Any ], / , name : str ) -> Schema :
172
+ def from_dict (d : Dict [str , Any ], name : str ) -> Schema :
173
173
""" A single Schema from its dict representation
174
174
:param d: Dict representation of the schema
175
175
:param name: Name by which the schema is referenced, such as a model name. Used to infer the type name if a `title` property is not available.
@@ -200,7 +200,7 @@ def from_dict(d: Dict[str, Any], /, name: str) -> Schema:
200
200
return schema
201
201
202
202
@staticmethod
203
- def dict (d : Dict [str , Dict [str , Any ]], / ) -> Dict [str , Schema ]:
203
+ def dict (d : Dict [str , Dict [str , Any ]]) -> Dict [str , Schema ]:
204
204
""" Get a list of Schemas from an OpenAPI dict """
205
205
result = {}
206
206
for name , data in d .items ():
@@ -221,7 +221,7 @@ class OpenAPI:
221
221
enums : Dict [str , EnumProperty ]
222
222
223
223
@staticmethod
224
- def from_dict (d : Dict [str , Dict [str , Any ]], / ) -> OpenAPI :
224
+ def from_dict (d : Dict [str , Dict [str , Any ]]) -> OpenAPI :
225
225
""" Create an OpenAPI from dict """
226
226
schemas = Schema .dict (d ["components" ]["schemas" ])
227
227
endpoint_collections_by_tag = EndpointCollection .from_dict (d ["paths" ])
0 commit comments