This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-05
Channels
- # announcements (5)
- # beginners (49)
- # boot (9)
- # calva (34)
- # cider (9)
- # clara (18)
- # clj-kondo (1)
- # cljsrn (7)
- # clojure (196)
- # clojure-dev (4)
- # clojure-europe (11)
- # clojure-france (3)
- # clojure-nl (13)
- # clojure-norway (2)
- # clojure-spec (8)
- # clojure-uk (85)
- # clojurescript (87)
- # clojurex (202)
- # core-logic (6)
- # data-science (6)
- # datomic (9)
- # dirac (1)
- # duct (93)
- # emacs (9)
- # events (1)
- # fulcro (22)
- # hoplon (30)
- # jackdaw (10)
- # keechma (1)
- # leiningen (5)
- # malli (17)
- # off-topic (9)
- # other-languages (3)
- # pedestal (7)
- # re-frame (3)
- # reagent (5)
- # reitit (9)
- # remote-jobs (6)
- # rewrite-clj (80)
- # ring (2)
- # shadow-cljs (191)
- # tools-deps (54)
- # vim (14)
- # xtdb (7)
Hello, I used reitit and reitit-swagger in Luminus framework, I found an argument, {:swagger {:security []}}
clojure
["/authping"
{:get {:summary "auth ping"
:middleware [authorized?]
:swagger {:security []}}
:response {200 {:body "OK"}}
:handler (fn [] {:status 200 {:body "OK"}})}
]
how to use it? please let me know any document...@e.tmailbank here's the swagger spec guide, hope it helps: https://swagger.io/docs/specification/2-0/authentication/ A reitit-spesific guide would be nice, if someone has time to contribute such.
👍 4
the :securityDefinitions
can be added to the swagger-spec route, :security
to routes that apply those rules.
I think i found a bug in sieppari:
(require '[sieppari.core :as sp]
'[sieppari.async.promesa])
(def noop-interceptor
{:enter identity
:leave identity})
(defn async-inc
[v]
(-> (p/delay 100 (inc v))
(p/then (fn [v]
(throw (ex-info "error" {}))))))
(defn test-execute
[]
(let [d (p/deferred)]
(sp/execute [noop-interceptor async-inc] 1 #(p/resolve! d %) #(p/reject! d %))
d))
@(test-execute) ;; blocks forever
this is the code that i expect to work (returning an rejected cfuture) but it blocks forever