Hi
Without dissoc in keys, how to avoid duplicate spec between backend and
frontend layer?
As an example
I have backend service where I defined spec like this
(s/def ::person-spec (s/keys ::req-un [::id ::fname ::lname]))
Here Id is mandatory for some purpose.
Now application layer I would like to reuse that backend spec but only id.
Look like now it is not possible as there is no dissoc
As it is application layer
(s/def ::person-ui-spec (s/merge (s/keys ::req-un [::channel])
::person-spec
) )
merge is excellent, as I could reuse exiting spec. But how I dissoc id from
exiting spec.
Only way is now to do is define again in application layer.
(s/def ::person-ui-spec (s/keys ::req-un [::channel ::fname ::lname]))
Do you consider dissoc in spec for keys?
Br,
Mamun
bnp paribas groups
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.