This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-10
Channels
- # aatree (4)
- # admin-announcements (1)
- # beginners (62)
- # boot (279)
- # business (14)
- # cider (1)
- # cljsrn (3)
- # clojure (88)
- # clojure-czech (3)
- # clojure-madison (2)
- # clojure-poland (117)
- # clojure-russia (74)
- # clojurescript (168)
- # core-async (8)
- # css (6)
- # datavis (39)
- # datomic (67)
- # devcards (2)
- # dirac (1)
- # editors (9)
- # emacs (13)
- # events (2)
- # hoplon (2)
- # jobs (9)
- # ldnclj (38)
- # lein-figwheel (9)
- # leiningen (7)
- # luminus (4)
- # off-topic (77)
- # om (114)
- # omnext (1)
- # onyx (221)
- # parinfer (10)
- # portland-or (5)
- # proton (3)
- # re-frame (24)
- # reagent (14)
- # ring-swagger (13)
I am building an API using luminus with swagger and I am trying to use schema to validate email format (`#"[email protected]+"`) in the request. I am not a able to find a way to provide a custom message, incase schema validation fails… Any ideas? this is what I have now, ...`:body [user {:user {:email #"[email protected]+"}}]`… in the swagger route definition
(use-fixtures
:once
(fn [f]
(migrations/migrate ["migrate"])
(f)))
(deftest test-messages
(jdbc/with-db-transaction [t-conn db/conn]
(jdbc/db-set-rollback-only! t-conn)
(is (= 1 (db/save-message!
{:id 1
:name "Bob"
:message "Hello World"
:timestamp (java.util.Date.)} {:connection t-conn})))
(is (= [{:id 1
:name "Bob"
:message "Hello World"
:timestamp (java.util.Date.)}]
(db/get-messages {:id "1"} {:connection t-conn})))))