This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-06
Channels
- # architecture (25)
- # bangalore-clj (1)
- # beginners (21)
- # boot (45)
- # cljs-dev (38)
- # clojure (272)
- # clojure-austin (7)
- # clojure-finland (7)
- # clojure-france (3)
- # clojure-italy (7)
- # clojure-japan (1)
- # clojure-russia (13)
- # clojure-spec (36)
- # clojure-uk (31)
- # clojurescript (96)
- # core-async (15)
- # cursive (16)
- # datascript (3)
- # datomic (97)
- # emacs (107)
- # hoplon (16)
- # jobs (9)
- # keechma (1)
- # luminus (1)
- # off-topic (19)
- # om (39)
- # onyx (15)
- # pedestal (3)
- # planck (22)
- # protorepl (4)
- # re-frame (20)
- # reagent (3)
- # ring-swagger (25)
- # specter (26)
- # test-check (19)
- # testing (1)
- # untangled (381)
`(defapi app (GET "/hello" [] :query-params [name :- String] (ok {:message (str "Hello, " name)})))`
Hi. Compojure-api uses the fnk-syntax (https://github.com/plumatic/plumbing/tree/master/src/plumbing/fnk), so: :query-params [{name :- String “default value”}]
I’ve been scratching my head over the securityDefinitions in compojure-api, parts of my API require “basic” and parts of it require “header” auth, but I can’t seem to get either to show up in Swagger UI
Examples in that page look like just Swagger spec, so that should give some idea
:data
should be written to spec as is, so you should be able to define :security
using that
and for setting :security
per route, you can use :swagger
metadata handler
thinks looks like a good example for it: https://github.com/swagger-api/swagger-editor/blob/master/spec-files/basic-auth.yaml
If someone has time, would be an awesome PR to integrate buddy into c-api for making the swagger+security mappings transparent.
all the hooks for this should be available: an mw that defines the auth via buddy + contributes to swagger-docs and an restructuring for the routes/endpoints to apply the rules.
@ikitommi Are you asking me? Is Reaktor holding a tech-meetup? I am no longer working there, but I’d love to have beers and chat sometime