Releases: dry-rb/dry-schema
Releases · dry-rb/dry-schema
v1.9.0
v1.8.0
v1.7.1
v1.7.0
This release ships with a bunch of internal refactorings that should improve performance but if you see any unexpected behavior please do report issues.
Fixed
- Handle arrays of hashes where Array constructor coerces non-Hash input (#351 fixed via #354) (@ojab)
- Run outer schema processor steps before inner ones (issue #350 fixed via #361) (@ojab)
- Fix key validator false negatives on empty collections (see #363) (@Drenmi)
- Prevent error message YAML files from being parsed multiple times (issue #352 via #364) (@alassek)
- Using constructor types should work fine now ie
required(:foo).filled(Types::Params::Integer.constructor(&:succ))
(issue #280 fixed via #365) (@solnic) - Handle non-Hash to Hash transformation in
before(:key_coercer)
(issue #350 fixed via #362) (@ojab)
Changed
v1.6.2
v1.6.1
Fixed
- Messages#[] handles meta/no meta cases more gracefully and has better interoperability with the I18n backend. This brings MessageCompiler#visit_unexpected_key up to parity with MessageCompiler#visit_predicate. Uses visit_predicate as basis for visit_unexpected_key. (@robhanlon22)
v1.6.0
Fixed
- Using sum types with a i18n backend no longer crashes (issue #328 fixes via #331) (@tylerhunt)
Changed
-
Inferring predicates from class names is deprecated. It's very unlikely your code depends on it,
however, if it does, you'll get an exception with instructions. (@flash-gordon)If you see an exception and don't rely on inferring, just disable it with:
Dry::Schema::PredicateInferrer::Compiler.infer_predicate_by_class_name false
Otherwise, enable it explicitly:
Dry::Schema::PredicateInferrer::Compiler.infer_predicate_by_class_name true
See #335 for rationale.
v1.5.6
Fixed
- Fixed stack error which was a regression introduced in 1.5.5 (issue #322 fixed via #323) (@flash-gordon)
v1.5.5
Fixed
- Key validation works with messages that have meta-data (issue #310 fixed via #313) (@tadeusz-niemiec)
- Using an external schema along with a key specified as a
:hash
works as expected (issue #296 fixed via #315) (@tadeusz-niemiec + @solnic) Result#error?(path)
works correctly when the path points to an array item (issue #317 fixed via #318) (@solnic)