ring-swagger

ring-swagger & compojure-api
wontheone1 2017-12-27T10:07:35.000078Z

I found one example with multiple responses definitions, https://github.com/metosin/compojure-api/blob/master/examples/thingie/src/examples/thingie.clj#L105. But would there be a way to have same status codes but different schema ? (I know it's not the best thing to do but just wondering)

wontheone1 2017-12-27T10:16:54.000119Z

@wontheone1 uploaded a file: https://clojurians.slack.com/files/U354VUKQA/F8K24FJF3/-.clj

wontheone1 2017-12-27T10:18:14.000110Z

@wontheone1 uploaded a file: https://clojurians.slack.com/files/U354VUKQA/F8KF5FW75/-.clj

wontheone1 2017-12-27T10:19:11.000193Z

Could I please show an example of having multiple response model with json response ?

wontheone1 2017-12-27T10:56:48.000165Z

I am not sure if I am doing something wrong or there s bug :)

wontheone1 2017-12-27T18:47:17.000285Z

Hi I got the multiple responses thing working the problem was elsewhere ! sorry about that.

wontheone1 2017-12-27T18:50:21.000333Z

One thing I cannot find any example is ... specifying responses that has no body

wontheone1 2017-12-27T18:51:25.000350Z

{:status 201} for example. I don't want to return any bodies. I tried the following things but they broke Swagger UI. So for now I am just putting there a dummy schema that's not really necessary for me

wontheone1 2017-12-27T18:52:17.000310Z

@wontheone1 uploaded a file: https://clojurians.slack.com/files/U354VUKQA/F8KP4U7PE/-.clj

wontheone1 2017-12-27T18:53:15.000032Z

specifying no-body responses supported in compojure-api? how do you do that ? thank you. (sorry for massive amounts of messages)

wontheone1 2017-12-28T14:53:58.000355Z

@hawari.rahman17 Yes; I know how to construct ring response with map but my question was about how do you define schema for response with no body for Swagger. Thank you. I see @ikitommi suggested workaround for my problem below !

hawari 2017-12-29T03:10:50.000074Z

Ah I see, I'm sorry that I misunderstood your question