Fork me on GitHub
#clojure-spec
<
2018-04-29
>
devurandom21:04:58

Hi! I would like to spec a map where the values have to conform to some spec, but the fields can be arbitrary. How do I do that?

devurandom22:04:54

Thanks, that works! This was the first time with Spec for me and the original code I modified was using cat, which was confusing me.

devurandom22:04:57

@alexmiller s/cat also matches maps, is that correct? So I need to get the ordering right to make s/map-of match first / instead of s/cat?

devurandom22:04:52

I came up with this, which appears to work (and passes tests), but I'll have to read more about spec to be sure: https://github.com/devurandom/venia/commit/31d0a15a28f4a20c9355f7d452f7b2b430f2ff16#diff-c1f178afedb93b23e615114ff149605d