This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-22
Channels
- # announcements (1)
- # aws (4)
- # beginners (73)
- # bristol-clojurians (1)
- # calva (7)
- # cider (5)
- # cljs-dev (11)
- # cljsrn (3)
- # clojure (30)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (69)
- # clojurescript (109)
- # cursive (21)
- # datascript (1)
- # datomic (72)
- # events (1)
- # fulcro (5)
- # graalvm (2)
- # helix (12)
- # hoplon (12)
- # jobs (2)
- # juxt (2)
- # kaocha (7)
- # keechma (1)
- # lambdaisland (5)
- # meander (18)
- # off-topic (52)
- # pathom (9)
- # re-frame (18)
- # reagent (5)
- # reitit (7)
- # sci (6)
- # shadow-cljs (76)
- # sql (9)
- # testing (4)
- # tools-deps (14)
- # xtdb (28)
Hi all. I have a query for which i couldn't find a solution. Is it possible to pass a map/json as value to field in multipart/form data
"template": {
"id": "as91",
"vars": {
"var1": {
"var-key-1": "var-value-1",
"var-key-2": "var-value-2",
"var-key-3": "var-value-3"
},
"var2": {
"var-key-1": "var-value-1",
"var-key-2": "var-value-2",
"var-key-3": "var-value-3"
}
}
}
i need something like this to be passed@kspriyan31 the multipart middleware in reitit is just a thin wrapper around ring multipart mw, which doesn't handle json parts, sorry. You can always parse the part by yourself.
Legacy pr to swap the multipart into faster java-version: https://github.com/metosin/muuntaja/pull/82
I have a compound spec that has a mandatory field. This field has a regex against it i.e., (def ISO8601 #"(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})\:(\d{2})")
and then (s/def ::datetime ISO8601)
and then (s/def ::create (s/keys :req-un [::name ::datetime]))
This spec is then defined in my route parameters thus :parameters {:body ::specs/create}}}]
I have swagger enabled, yet when I visit the swagger ui webpage and look at the POST example, it only shows the model as {"name": "string"}
without the datetime
field. When I click on model, it rightly shows that datetime
is mandatory. Is this a limitation that the swagger generator is unable to show complex types, like a regex (I also tried with a function and that won't show either)?