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

Can I have response type as xml instead of json in a swagger ui.

Open vijaya89 opened this issue 13 years ago • 3 comments

I am trying to use swagger-ui for my already defined rest-apis. My application used to return xml previously. So I am interested in xml as response type

vijaya89 avatar Jun 13 '13 20:06 vijaya89

To add to my submission previously, My rest api's are in java.

vijaya89 avatar Jun 13 '13 20:06 vijaya89

yes, but you will need to use 1.3.0-SNAPSHOT to do this. There is now an annotation to set the produces content-type, which tells swagger-ui to render in xml.

fehguy avatar Jun 14 '13 04:06 fehguy

see here for an example, there will be a drop-down which renders xml if selected.

https://github.com/wordnik/swagger-core/tree/develop-1.3/samples/scala-jaxrs

fehguy avatar Jun 14 '13 05:06 fehguy