swagger-core
swagger-core copied to clipboard
Can I have response type as xml instead of json in a swagger ui.
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
To add to my submission previously, My rest api's are in java.
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.
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