@@ -98,7 +98,7 @@ def process_parameter(self, value: openapi.Parameter, stack: Stack) -> python.Pa
9898 media_type , media_type_obj = next (iter (value .content .items ()))
9999 # encoding = media_type_obj.encoding
100100 typ = self .schema_converter .process_schema (
101- media_type_obj .schema_ , stack .push_all ('content' , media_type ), value .required
101+ media_type_obj .schema_ , stack .push ('content' , media_type ), value .required
102102 )
103103 else :
104104 raise TypeError (f'{ stack } : schema or content is required' )
@@ -125,7 +125,8 @@ def process_path(
125125 ) -> None :
126126 common_params_stack = stack .push ('parameters' )
127127 common_params = [
128- self .process_parameter (param , common_params_stack .push (idx )) for idx , param in enumerate (value .parameters )
128+ self .process_parameter (param , common_params_stack .push (str (idx )))
129+ for idx , param in enumerate (value .parameters )
129130 ]
130131
131132 for method , operation in value .model_extra .items ():
@@ -153,7 +154,7 @@ def process_content(self, value: Mapping[str, openapi.MediaType], stack: Stack)
153154 mime_parsed = parse_media_range (mime )
154155 if mime_parsed [:2 ] != ('application' , 'json' ):
155156 continue
156- types [mime ] = self .schema_converter .process_schema (media_type .schema_ , stack .push_all (mime , 'schema' ))
157+ types [mime ] = self .schema_converter .process_schema (media_type .schema_ , stack .push (mime , 'schema' ))
157158 return types
158159
159160 def process_operation (
@@ -178,7 +179,7 @@ def process_operation(
178179 model = python .OperationFunction (
179180 name = value .operationId ,
180181 method = stack .top (),
181- path = cast ( str , stack [- 2 ]),
182+ path = json_pointer . decode_json_pointer ( stack [- 2 ]),
182183 request_body = request_body ,
183184 params = params ,
184185 responses = responses ,
@@ -197,7 +198,7 @@ def _mk_params(
197198 for param in common_params :
198199 params [param .name ] = param
199200 for idx , oa_param in enumerate (value ):
200- param = self .process_parameter (oa_param , stack .push (idx ))
201+ param = self .process_parameter (oa_param , stack .push (str ( idx ) ))
201202 params [param .name ] = param
202203 return list (params .values ())
203204
@@ -208,7 +209,7 @@ def process_security(
208209 if value is None :
209210 return None
210211
211- security = [self .process_security_requirement (item , stack .push (idx )) for idx , item in enumerate (value )]
212+ security = [self .process_security_requirement (item , stack .push (str ( idx ) )) for idx , item in enumerate (value )]
212213 return security or None
213214
214215 def process_security_requirement (
@@ -252,7 +253,7 @@ def _(self, value: openapi.OAuth2SecurityScheme, stack: Stack) -> None:
252253 flow = value .flows .implicit
253254
254255 if flow .refreshUrl :
255- raise NotImplementedError (stack .push_all ('flows' , 'implicit' , 'refreshUrl' ))
256+ raise NotImplementedError (stack .push ('flows' , 'implicit' , 'refreshUrl' ))
256257
257258 self .target .security_schemes [flow_name ] = python .ImplicitOAuth2Flow (
258259 name = auth_name ,
0 commit comments