This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
If I had a map with :billing-address
and :shipping-address
keys whose associated values were expected to be valid against the same ::address
spec, could I express that in spec/keys
directly - i.e. without creating intermediary ::billing-address
and ::shipping-address
specs? Also not sure if (spec/def ::billing-address ::address)
or something like it, is an option?
you would need to do the latter, which is an option
it's often convenient to have both structural specs (like address) and named attributes that refer to those
Ok fab - thanks @alexmiller Probably seen that in code many times but not really thought about it much. Trying to build a API data dictionary at work that promotes specifying attributes over HTTP request/responses bodies (to avoid the repetition that brings.) Looks like I will need to list these named specs in the dictionary as well as the attributes themselves.