This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-01
Channels
- # atom-editor (11)
- # babashka (25)
- # beginners (142)
- # boot (9)
- # calva (3)
- # cider (19)
- # clara (15)
- # clj-kondo (6)
- # cljs-dev (20)
- # clojars (11)
- # clojure (164)
- # clojure-dev (9)
- # clojure-europe (6)
- # clojure-italy (17)
- # clojure-nl (3)
- # clojure-spec (19)
- # clojure-sweden (10)
- # clojure-uk (23)
- # clojurescript (34)
- # code-reviews (31)
- # conjure (20)
- # cursive (14)
- # datomic (54)
- # emacs (1)
- # fulcro (51)
- # graalvm (24)
- # graphql (6)
- # helix (3)
- # jobs (3)
- # kaocha (1)
- # malli (2)
- # meander (15)
- # off-topic (81)
- # pathom (2)
- # re-frame (43)
- # reagent (26)
- # reitit (1)
- # releases (1)
- # sci (12)
- # shadow-cljs (29)
- # sql (22)
- # timbre (3)
- # tools-deps (15)
Hi, I’m having a bit of problems with swagger.json generation with reitit. My idea is to run my app with two sets of routes, where the public one is swagger-documented but the private one is not.
(defn routes []
["/public" public-route-configuration
;; swagger documentation
["" {:no-doc true
:swagger {:info {:title "Public"
:description "Public api for external service integration"}}}
["/swagger.json"
{:get (swagger/create-swagger-handler)}]
["/api-docs/*"
{:get (swagger-ui/create-swagger-ui-handler
{:url "/api/swagger.json"
:config {:validator-url nil}})}]]
["/ping"
{:no-doc true
:get (constantly (ok {:message "pong"}))}]
(rest-of-public-routes)]
["/private" private-route-configuration
(rest-of-private-routes)])
For some reason if I add the private route the swagger.json generation fails silently. Is this something that is discouraged and therefore shouldn’t even work by design or should I put the swagger description on the top level instead and mark them with :no-doc?