compojure-api "2.0.0-alpha20" and clojure.spec (with :coercion :spec) on a PUT request, if I specify :responses {204 {:description "Success." }}
it won't compile. I'll get CompilerException java.lang.IllegalArgumentException: No implementation of method: :specify of protocol: #'compojure.api.coercion.spec/Specify found for class: nil
. It requires a :schema
k/v pair to compile. For now, e.g. :schema (st/spec (constantly true))
(maybe not the right test, but 204's don't have a body and I'm unsure what to put). Anyway, seems like a bug that :schema is required to compile the code.
@dave.tenny true that, would you like to fix that?
Sure thing, I'll put that on my to-do list as soon as I finish the 64 bit conversion to accommodate more items.
More seriously, is there some simple fix you already know about that someone unfamiliar with the innards of compojure-api might submit a PR for? My point in asking is as much a question of whether I'm doing it wrong, or whether it's a known bug, at this point, using alpha compojure-api support on top of alpha-spec support. Most of our APIs use compojure-api+Plumatic schema, I've undertaken a new API as the guinnea pig for compjure-api+spec. It's ... rough ... comparatively speaking.