Query Parameter description in ring-swagger

204 views Asked by At

I'm using ring-swagger via compojure-api. I have a few query parameters and I'm struggling to find a way to add a description to a single query parameter. I can add the summary of the entire endpoint but that's not enough.

Is it possible to add a swagger description to a single query parameter using ring-swagger/compojure-api?

1

There are 1 answers

0
siltalau On BEST ANSWER

compojure.api.sweet/describe.

For example:

(GET "/hello" []
  :query-params [name :- (describe String "This is the swagger description for the parameter")]
  (ok {:message (str "Hello, " name)}))