not using namespaced keys, due to graphql

This commit is contained in:
Bryce Covert
2018-04-10 10:51:21 -07:00
parent 4a0275f024
commit 53905c317b
19 changed files with 114 additions and 109 deletions

View File

@@ -13,10 +13,10 @@
(s/def ::email (s/nilable (s/and string? (s/or :is-email #(re-matches email-regex %)
:is-empty #(= % "")))))
(s/def ::company (s/keys :req [::name]
:opt [::email
::id]))
(s/def ::company (s/keys :req-un [::name]
:opt-un [::email
::id]))
(def company-spec (apply hash-map (drop 1 (s/form ::company))))
(def all-keys (concat (:req company-spec) (:opt company-spec)))
(def all-keys (map #(keyword (name %)) (concat (:req-un company-spec) (:opt-un company-spec))))