You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I see :min and :max are not supported on :map. It would be a nice addition. It is already present in :map-of.
We had a use-case in which two fields are mandatory and 5 are optional. And at least an extra field out of the 5 optional is mandatory. In our case it would be simple to just add the :min property.
We solved it with [:and ,,, [:fn ,,,]] but I think the min/max make sense even if the map properties have been defined. Don't know the reason why it was not there since the beginning, but in case it was part of some decision, I think it would be nice to revisit. Number of entries is completely orthogonal to wether the keys are explicit or not.
Also, similar to :map-of the properties should be propagated to json-schema with :minProperties, :maxProperties.
Thanks
The text was updated successfully, but these errors were encountered:
Hi, I see
:min
and:max
are not supported on:map
. It would be a nice addition. It is already present in:map-of
.We had a use-case in which two fields are mandatory and 5 are optional. And at least an extra field out of the 5 optional is mandatory. In our case it would be simple to just add the
:min
property.We solved it with
[:and ,,, [:fn ,,,]]
but I think the min/max make sense even if the map properties have been defined. Don't know the reason why it was not there since the beginning, but in case it was part of some decision, I think it would be nice to revisit. Number of entries is completely orthogonal to wether the keys are explicit or not.Also, similar to
:map-of
the properties should be propagated to json-schema with:minProperties
,:maxProperties
.Thanks
The text was updated successfully, but these errors were encountered: