This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; require our dependencies. | |
(require '[schema.core :as s] | |
'[humanize.schema :as h]) | |
; lets define a few schemas, we want: first name, last name and office location (if available). | |
(def FirstName s/Str) | |
(def LastName s/Str) | |
(def Location (s/maybe (s/enum "london" "boston"))) | |
; now try defining a schema map (and make location an optional parameter). |