v0.5.0
Pre-release
Pre-release
Added
-
Support for arbitrary meta-data in messages, ie:
en: dry_schema: errors: filled?: text: "cannot be blank" code: 123
Now your error hash will include
{ foo: [{ text: 'cannot be blank', code: 123 }] }
(solnic + flash-gordon) -
Support for type specs in
array
macro, ierequired(:tags).array(:integer)
(solnic) -
Support for type specs in
each
macro, ierequired(:tags).each(:integer)
(solnic) -
Shortcut for defining an array with hash as its member, ie:
Dry::Schema.Params do required(:tags).array(:hash) do required(:name).filled(:string) end end
Fixed
- Inferring predicates doesn't crash when
Any
type is used (flash-gordon) - Inferring type specs when type is already set works correctly (solnic)
Changed
- [BREAKING]
:monads
extension wraps entire result objects inSuccess
orFailure
(flash-gordon) - When
:hints
are disabled, result AST will not include hint nodes (solnic)