Fork me on GitHub
#ring-swagger
<
2020-10-27
>
bastilla09:10:29

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)!

bastilla11:10:18

Just found it:

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