This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-19
Channels
- # announcements (13)
- # asami (43)
- # babashka (35)
- # beginners (175)
- # calva (23)
- # cider (5)
- # clj-kondo (68)
- # cljsrn (4)
- # clojure (61)
- # clojure-australia (7)
- # clojure-europe (20)
- # clojure-gamedev (59)
- # clojure-israel (11)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-norway (21)
- # clojure-spec (12)
- # clojure-uk (43)
- # clojurescript (9)
- # cursive (56)
- # data-oriented-programming (5)
- # datascript (1)
- # events (1)
- # fulcro (16)
- # honeysql (46)
- # leiningen (1)
- # malli (4)
- # off-topic (12)
- # pathom (46)
- # re-frame (24)
- # reagent (14)
- # reitit (1)
- # reveal (8)
- # rewrite-clj (16)
- # ring (13)
- # sci (9)
- # spacemacs (14)
- # specter (2)
- # sql (2)
- # tools-deps (1)
- # vim (2)
Hello, I have a question that I was hoping to get some help on. I am trying to add Swagger docs to my API. I’m using reitit-swagger and following the docs etc. I have run into a problem with spec and am getting this error when trying to load the swagger.json. This is the error :
java.lang.ClassCastException: class clojure.spec.alpha$every_impl$reify__2264 cannot be cast to class clojure.lang.IPersistentMap (clojure.spec.alpha$every_impl$reify__2264 and clojure.lang.IPersistentMap are in unnamed module of loader 'app')
The spec that seems to be failing is the response part of this endpoint:
["/:portfolio-id/assets" {:patch {:parameters {:path {:portfolio-id ::portfolio/id}
:body :cue.web.portfolio/add-remove-asset-request}
:responses {200 (s/coll-of :cue/asset)}
:handler web.portfolio/add-remove-assets!}}]
and :cue/asset
is a simple map spec.
I get a similar error with nil spec :responses {204 nil? 403 nil?}
Does anyone have any idea why this might happen and how to fix it ?