This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-10
Channels
- # announcements (4)
- # beginners (111)
- # boot (34)
- # cider (67)
- # cljdoc (10)
- # clojure (90)
- # clojure-dev (37)
- # clojure-europe (3)
- # clojure-gamedev (3)
- # clojure-italy (18)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-spec (24)
- # clojure-uk (59)
- # clojurescript (41)
- # cursive (32)
- # datomic (31)
- # emacs (21)
- # figwheel (1)
- # figwheel-main (2)
- # fulcro (43)
- # graalvm (6)
- # graphql (3)
- # jobs-discuss (3)
- # kaocha (1)
- # nyc (1)
- # off-topic (22)
- # pathom (10)
- # pedestal (11)
- # re-frame (9)
- # reitit (17)
- # shadow-cljs (15)
- # spacemacs (13)
- # sql (6)
- # testing (5)
- # tools-deps (3)
- # vim (13)
- # yada (1)
First of all Thanks for the awesome framework
{:get {:summary "Lists all "
:parameters {:path {:pageNo integer?}
:query {:accessZone string?
:facilityId int?
:isAllInActivePatientsSearch boolean?
:dischargedPatientsSearch boolean?
:order string?
:type string?
:searchQuery string?}}
how can I make some of the query params optional?Is there any away to define them as optional inline? Like in schema.core :return {(s/optional-key :message) s/Str}
How come these are conflicting routes ?
Router contains conflicting route paths:
/api/patient/:patientId
-> /api/patient/admission
/api/patient/:patientId/move-to-cic
-> /api/patient/pcp/:patientId
/api/patient/:patientId/move-to-observation
-> /api/patient/pcp/:patientId
@petr could you tell more about your setup? sendinf arraybuffer directly to a handler? Or is the web server passing arraybuffer as :body
?
@gdrte there is spec-tools.data-spec/opt
and spec-tools.data-spec/req
to wrap keys, e.g. :query {:accessZone string?, (ds/opt :facilityId) int?}
@gdrte routes are just strings, for example in the last conflict, a path of /api/patient/pcp/move-to-observation
would match both routes. If you really need those, you can disable the conflict resolution with :conflicts nil
router option. Uses linear-router so the first match is used.
@ikitommi I was passing the array buffer as the :body
which is picked up by a handler function
@petr reitit defaults to muuntaja (https://github.com/metosin/muuntaja) for body decoding, I think it doesn't read array buffers. I believe most (if not all?) web servers pass it as InputStream. If you need buffers, you could: 1) pre-process or parse it yourself (custom mw or interceptor) 2) use some other body mw/int that does that 3) a PR to Muuntaja to support it