dry-rb / dry-schema

Coercion and validation for data structures
https://dry-rb.org/gems/dry-schema
MIT License
421 stars 110 forks source link

Fix regression introduced in 1.10.0 #437

Closed solnic closed 2 years ago

solnic commented 2 years ago

In 8ee785811e2dc6f7a01eb08d5c5f280d6b82b852 value DSL method started extracting type specs as well which in case of array(sum_type) caused double-type-spec extraction that broke things.

This fix simply tweaks value so that it checks if there's no type_spec already provided in the opts.

Fixes #436