Open al-baba opened 3 weeks ago
- Adds a response-type into the "Response content type" drop-down menu displayed in Swagger
- When selected, the APP will return the correct response-header and content type
- The default for flask-RESTPlus is application/json
Note
- These will only be used by namespaces so are undecorated. Decorated versions will appear in app.py
def xml(data, code, headers):
data = dicttoxml(data)
resp = make_response(data, code)
resp.headers['Content-Type'] = 'text/xml'
return resp
in order to get full coverage you need to stress test the args
and to do this you need to request with those options:
response = client.get('/name/Alejandro')
but more like: