Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Schema for Clojure(Script) Data Shape Declaration and Validation. Parent comment
Actually, schema can express arbitrary constraints. Your example translates to schema as:
{String {(s/required-key "product") [String] (s/required-key "type") (s/enum "type1" "type2") s/Any s/Any}} ;; allow any other k-v pairs
Looks like I'll be using this library sooner than I thought, thanks!
Actually, schema can express arbitrary constraints. Your example translates to schema as: