This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-14
Channels
- # aleph (3)
- # beginners (25)
- # cider (12)
- # clojure (42)
- # clojure-canada (3)
- # clojure-nl (1)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (24)
- # clojurescript (23)
- # cloverage (1)
- # datomic (7)
- # figwheel-main (3)
- # jobs-discuss (14)
- # onyx (48)
- # parinfer (3)
- # re-frame (20)
- # reitit (28)
- # shadow-cljs (3)
- # testing (1)
- # vim (37)
:parameters {:body {:name ::user-spec/name
:password string?
:client-id ::oauth-spec/client-id
i need to do
:parameters {:body (s/keys :req-un [...]
:opt-un [...])}
to have the parameters show up individuallybut i'd prefer to have my specs defined in one place (not in the routes definition directly)
my current solution is def
ing it as a map instead of a spec
(def exchange-spec
{:body (s/merge
(s/or :code ::exchange-by-code
:pass ::exchange-by-auth)
(s/keys :req-un [::grant-type]
:opt-un [::client-id ::client-secret]))})
but this feels a bit hackyyes, set :jsonEditor
to true
anf you should see the form (https://github.com/swagger-api/swagger-ui/blob/2.x/README.md)
(create-swagger-ui-handler {:path "/swagger"
:config {:jsonEditor true}})
should it be like that?