I have a bit of a philosophical question: I watched several talks about spec and it's pretty clear how you'd use it for domain modelling when starting from scratch, but several mentioned its benefits in speccing an existing codebase. Any tips on where and how to start with speccing an existing code base?
I would start by adding fdef
s for key functions
there was this bit from stuart halloway: http://blog.cognitect.com/blog/2017/6/19/improving-on-types-specing-a-java-library -- may be that's of some use?
Hi, does clojure-spec provide or will provide a way to convert schema maps (unqualified) without explicitly specifying spec on every val? e.g.
From (spec/schema {:type #{:open :closed}}) -> (spec/schema {:type (spec/spec #{:open :closed})})
Seems like a map traversal, is it something that can already be done with normal clojure on the context of spec and schemas?I dont think you should even need that?
True, I was confused by this in the schema and select wiki [::a ::b {:c (s/spec int?)}]
, but in the unqualified keys section is shown as I wanted