Fork me on GitHub

I found one example with multiple responses definitions, 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)


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


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


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


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


{: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


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


Hi @U354VUKQA, since compojure-api built on top compojure, and with that, ring, any valid ring response map will suffice.

{:status 204
 :headers {}
 :body ""}
You might want to learn more about it here


@U84FTP06P 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 @U055NJ5CC suggested workaround for my problem below !


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