This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-12
Channels
- # beginners (4)
- # boot (58)
- # braid-chat (9)
- # cider (19)
- # clojure (26)
- # clojure-austin (8)
- # clojure-berlin (1)
- # clojure-poland (2)
- # clojure-russia (238)
- # clojurescript (22)
- # core-async (2)
- # cursive (6)
- # datomic (32)
- # emacs (5)
- # hoplon (1)
- # jobs (10)
- # keechma (1)
- # ldnclj (2)
- # off-topic (5)
- # om (7)
- # onyx (4)
- # proton (1)
- # re-frame (10)
- # reagent (5)
- # ring-swagger (10)
The "extend" option sounds better to me.
But you may get better advice if you describe what you're really doing instead of talking about language constructs.
hey guys anyone familiar with compojure-api with swagger
I have been getting a weird error banging my head on this all day. Trying to do a post to a ring endpoint that I am trying to swagger enable. When call the endpoint with no http body, the calls works fine. However, when I try I call the api with a body, I am getting an error clojure.lang.PersistentArrayMap cannot be cast to java.io.InputStream
Here is a partial fragment of my POST definition: (POST "/v1/organizations/:org-id/edges" {:keys [body headers]} :path-params [org-id :- String] :body [body edge-post/PostEdgeRequest] :return edge-post/PostEdgeResponse
The code seems to be choking on the {:keys [body headers]}
Any help would be appreciated
I posted a question here in the pedestal user group https://groups.google.com/forum/#!topic/pedestal-users/Cd_ekIKVBfc
so when I have that line in a normal component start
function, it doesn’t terminate and allow the rest of the system to get setup correctly
is there a way around it? Or is there a way to get pedestal started and serving without blocking, so the rest of the component workflow would still work?
@firstclassfunc: you uttered the incantation to summon the OSGi overlords? I may be a prophet....
@john.carnell you dont have to destucture the body from the request (after the path definition) , :body [body ...]
already does that for you.
@john.carnell see https://github.com/metosin/compojure-api/blob/master/examples/simple/src/simple/handler.clj#L31-L35
Suppose L
is defined as the list '(fn-call "arg")
. When writing a macro m
, how does one remove the '
symbol from L
so that, at compile time, we can treat L
as a function expression that should be called?
Asked differently: what f
satisfies (f '(fn-call "arg")) ;=> (fn-call "arg")
**without using eval
(defmacro unq [form] `(do ~(second form)))
? But it's ok to do eval in a macro. Also I should add: That quoting isnt necessary. A macro will already get the form and not evaluate it.getting the error #object[Error Error: No protocol method ICollection.-conj defined for type number: 1]
@kingoftheknoll: did you try conj!
yup I’m rewriting it with loop and about to test out if it works. But with loop I’m not using the same accumulator for grouping vs counting
so it’s acually looping much cleaner
I’ll post what I did to share if I get it working