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 using schema to validate email format (`#".+@.+”`) 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 #".+@.+"}}]`...
@sreenath.n: one option is to use schema's (pred) function, which can take an optional predicate name for slightly nicer validation errors
is there a way to specify response examples using either compojure-api or ring-swagger?
i saw that it's possible to specify multiple response schemas using :responses, but am looking for a way to specify concrete response examples
… just another key on the schema meta-data or could be something more useful - a mechanism to verify that the samples are valid against the schema.
Same a default-values, there will be proper support (via coercion) to those in schema-tools, and will be part of schema-tools. Now just used for documentation.
@ikitommi: problem solved! our goal was to quickly create a mock api that the frontend can start talking to while the api server was still being built
we figured out that once we had the response schemas in place, we could import the generated swagger.json into http://apiary.io