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