ring-swagger

ring-swagger & compojure-api
bastilla 2020-10-27T09:31:29.004900Z

hi there! Could someone point me to sample code showing how to transfer JSON between client and server? So far I just deal with scalar strings, like this:

:swagger {:produces ["text/plain"]}
            :parameters {:query {:add string? :location string? }}
            ;:responses {200 {:body string?}}
            :handler (fn [{{{:keys [add location]} :query} :parameters}]
but this becomes cumbersome and unfeasible at some point. Appreciate any hints (or links)!

bastilla 2020-10-27T11:35:18.005Z

Just found it:

:parameters {:body {:my-json map?}}
Everything else is the same.