Imagine I have a generic keyword => string map with a special key that stores a number:
{ ::count 7
:x "x"
:y "y"
:z "z"
... }
Both cases are easy to validate on their own:
(s/def ::count number?)
(s/conform (s/keys ::count) { ::count 7 })
(s/conform (s/map-of keyword? string?) { :x "x", :y "y", :z "z" })
But how do I write a spec to validate them when they are in a single map?
I tried to use s/every but then another problem popped up: how do I reference or check another spec from inside s/every predicate? In my case, values are more complex than string? and have their own spec.
Please help
Nikita