Fork me on GitHub
#schema
<
2021-11-19
>
ag02:11:14

what's the right way to generate from schema with a pred? i.e., how do I:

(s/defschema User
  {:auth (s/pred map?)})

(g/generate User)
This throws "You must provide a leaf generator"

ag02:11:13

It looks like I have to change the schema to be like:

(s/defschema User
  {:auth (s/constrained {s/Any s/Any} map?)})

(g/generate User)
That's annoying

ag02:11:05

Oh well, this shit not working either:

(s/defschema User
  {:get-config (s/=> s/Any)})

(g/generate User)