-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Description
When attempting to use the :return keyword in my GET* function, I get a strange response error
{
"errors": "(not (sequential? a-java.lang.String))"
}
When I remove the :return keyword I don't get the error above. I assume the function that handles the schema validation is only expecting a body. Does anyone else use Liberator in conjunction with the swagger-docs function?.
(context* "/search" []
:tags ["search"]
(GET* "/" []
:return [UserProfile]
:query-params [term :- s/Str]
:summary "returns ok"
search-term))
Profile schema
(defschema UserProfile {:email Str
:img_url Str})
Liberator Resource. search-for-term returns a vector of maps.
(defresource search-term
:authorized? true
:allowed-methods [:get]
:available-media-types ["application/json"]
:handle-ok (fn [ctx]
(search-for-term (get-in ctx [:request :params :term]))))
Metadata
Metadata
Assignees
Labels
No labels