@metametadata oh, it’s not expected, Issue &/ PR welcome.
Hey I am trying out the compojure-api but I am getting this error when doing a post request.`"title": "(not (instance? java.lang.String a-java.lang.Class))"` any ideas what this means?
I am following the compojure-api examples form here https://github.com/metosin/compojure-api/tree/master/examples/thingie/src/examples
@andreasp1994 that’s an Schema error for wrong type. What endpoint are you trying?
I am trying to do a Todo list REST API based on the pizza example
So when I am trying to add a new TodoItem using a POST request on /todos/ I get this error
Interestingly if I set the title to an integer lets say 1 I get "title": "(not (instance? java.lang.String 1))"
can you paste you endpoint code?
@ikitommi here it is https://paste.ofcode.org/BfWDivFR7gbpeekdm865pK
line 49 should be (ok (add! todo)))
you are returning the schema, and the response coercion fails.
otherwise, looks good
if you get http 500 with schema error, it's response validatipn, 400 is for request
Hope this helps
ping @andreasp1994
Oh my god.... Thank you so much.. I can't believe I missed that.
Hey is it possible to use swagger with spec rather than Schema???