swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Body sample XML response

Open johngtrs opened this issue 8 years ago • 1 comments

There is a problem with the XML Body Sample. The JSON snippet works well but when I choose the XML type format this doesn't change. It stays in the JSON format. Could you fix that please ?

johngtrs avatar Apr 04 '16 15:04 johngtrs

Hello,

The swagger-ui version used inside this project search a content-type. So you could solve your problem, sending the good content-type into the response headers :

Example for python : response = make_response(your-xml) response.headers['Content-Type'] = 'application/xml'

Hope it help.

Regards,

Thierry

tboulogne avatar Jun 28 '16 08:06 tboulogne