Open
Description
I have a schema that uses ISO2 country codes in various places, and in one of those places a list of countries is defined.
^{:type String :cardinality [1 n]
:optional true
:spec/extend :purely.receivables.generators/iso-2code?
:spec/gen :purely.receivables.generators/iso-2code} countries
Unfortunately, when :spec/extend
is used with :cardinality
, this causes problems.
Exception: java.lang.IllegalArgumentException: Wrong number of args passed to keyword: :purely.receivables.generators/iso-2code
It seems like it would be straightforward to change the interpretation of :spec/extends
so that the provided generator would be used within the coll-of
generator rather than outside it, but this might prevent other users from writing specs that check the properties of whole sequences rather than just their elements.
Do you have any thoughts about the best way to solve this?
Metadata
Assignees
Labels
No labels