@@ -131,13 +131,13 @@ def to_response(self, service, result):
131
131
:return: http.Response or JSON dict
132
132
"""
133
133
134
- def to_openapi_query_parameters (self , service ):
134
+ def to_openapi_query_parameters (self , service , spec ):
135
135
return {}
136
136
137
- def to_openapi_requestbody (self , service ):
137
+ def to_openapi_requestbody (self , service , spec ):
138
138
return {}
139
139
140
- def to_openapi_responses (self , service ):
140
+ def to_openapi_responses (self , service , spec ):
141
141
return {}
142
142
143
143
@@ -161,10 +161,10 @@ def _binary_content_schema(self):
161
161
for mediatype in self ._mediatypes
162
162
}
163
163
164
- def to_openapi_requestbody (self , service ):
164
+ def to_openapi_requestbody (self , services , spec ):
165
165
return {"content" : self ._binary_content_schema }
166
166
167
- def to_openapi_responses (self , service ):
167
+ def to_openapi_responses (self , service , spec ):
168
168
return {"200" : {"content" : self ._binary_content_schema }}
169
169
170
170
def to_response (self , service , result ):
@@ -209,7 +209,7 @@ def to_response(self, service, result):
209
209
return validator .document
210
210
raise SystemError (_ ("Invalid Response %s" ) % validator .errors )
211
211
212
- def to_openapi_query_parameters (self , service ):
212
+ def to_openapi_query_parameters (self , service , spec ):
213
213
json_schema = self .to_json_schema (service , "input" )
214
214
parameters = []
215
215
for prop , spec in list (json_schema ["properties" ].items ()):
@@ -238,11 +238,11 @@ def to_openapi_query_parameters(self, service):
238
238
239
239
return parameters
240
240
241
- def to_openapi_requestbody (self , service ):
241
+ def to_openapi_requestbody (self , service , spec ):
242
242
json_schema = self .to_json_schema (service , "input" )
243
243
return {"content" : {"application/json" : {"schema" : json_schema }}}
244
244
245
- def to_openapi_responses (self , service ):
245
+ def to_openapi_responses (self , service , spec ):
246
246
json_schema = self .to_json_schema (service , "output" )
247
247
return {"200" : {"content" : {"application/json" : {"schema" : json_schema }}}}
248
248
@@ -293,7 +293,7 @@ def from_params(self, service, params):
293
293
def to_response (self , service , result ):
294
294
return self ._do_validate (service , data = result , direction = "output" )
295
295
296
- def to_openapi_query_parameters (self , service ):
296
+ def to_openapi_query_parameters (self , service , spec ):
297
297
raise NotImplementedError ("List are not (?yet?) supported as query paramters" )
298
298
299
299
def _do_validate (self , service , data , direction ):
0 commit comments