From 527380e241e6fd59297b2a7363358c4f5c9e507f Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Mon, 8 Jul 2019 22:12:07 +0200 Subject: [PATCH] specs restructuring --- src/wanijo/schema/domain.clj | 6 ++---- src/wanijo/specs.clj | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wanijo/schema/domain.clj b/src/wanijo/schema/domain.clj index ebe0e53..53674a3 100644 --- a/src/wanijo/schema/domain.clj +++ b/src/wanijo/schema/domain.clj @@ -4,16 +4,14 @@ [wanijo.framework.neo4j :as neo4j])) (spec/def ::name - (spec/and string? not-empty)) -(spec/def ::created-at - (spec/and string? ::neo4j/date-str)) + (spec/and ::specs/name (complement empty?))) (spec/def ::assigned-to (spec/or :public empty? :assigned (spec/coll-of ::neo4j/uuid) :assigned-single ::neo4j/uuid)) (spec/def ::schema (spec/keys ::req-un [::name - ::created-at + ::specs/created-at ::neo4j/uuid])) (neo4j/defquery all-created-by diff --git a/src/wanijo/specs.clj b/src/wanijo/specs.clj index ee39408..3bdc488 100644 --- a/src/wanijo/specs.clj +++ b/src/wanijo/specs.clj @@ -4,6 +4,8 @@ (spec/def ::created_at ::neo4j/date-str) (spec/def ::updated_at ::neo4j/date-str) +(spec/def ::created-at + (spec/and string? ::neo4j/date-str)) (spec/def ::name string?) (spec/def ::instance_uuid ::neo4j/uuid) (spec/def ::attribute_uuid ::neo4j/uuid)