Releases: dry-rb/dry-schema
Releases · dry-rb/dry-schema
v1.3.2
Added
- Support for new predicates:
bytesize?
,min_bytesize?
andmax_bytesize?
(@bmalinconico)
v1.3.1
v1.3.0
Added
-
Automatic predicate inferring for constrained types! (@flash-gordon)
Types::Name = Types::String.constrained(min_size: 1) schema = Dry::Schema.define do required(:name).value(Types::Name) end schema.(name: '').errors.to_h # => { name: ["size cannot be less than 1"] }
-
Support for redefining re-used schemas (issue #43) (@skryukov)
Fixed
- Type container is passed down to nested schemas (@flash-gordon)
v1.2.0
Added
- Ability to configure your own type container (@Morozzzko)
Fixed
filled
macro no longer generates incorrect messages for arrays (issue #151) (@solnic)filled
macro works correctly with constructor types (@solnic)filled
works correctly with nested schemas (#149) (@solnic + @timriley)BigDecimal
type is correctly handled by predicate inference (isssue #158) (@solnic)- Works with latest
dry-logic
which provides the newrespond_to?
predicate (#153) (@flash-gordon) - Custom array constructors are no longer discredited by
array
macro (@solnic)
Changed
v1.1.0
filled
macro and it may result in different hint messages in some cases.
Added
config.messages.default_locale
for setting default locale (surprise, surprise) (solnic)Config
exposespredicates
setting too (solnic)
Fixed
filled
macro behavior results inmust be filled
error messages when appropriate - see PR #141 for more information (issue #134) (solnic)- Filter rules no longer cause keys to be added to input (issue #142) (solnic)
- Filter rules work now with inheritance (solnic)
- Inherited type schemas used by coercion are now properly configured as
lax
type (solnic) Config
is now finalized before instantiating schemas and properly dupped when its inherited (flash-gordon + solnic)Config#eql?
works as expected (solnic)- Predicates are properly inferred from array with a member type spec, ie
array[:integer]
results inarray? + each(:integer?)
(issue #140) (solnic)
v1.0.3
Fixed
Object#hash
is no longer used to calculate cache keys due to a potential risk of having hash collisions (solnic)- Predicate arguments are used again for template cache keys (solnic)
I18n
messages backend no longer evaluates templates twice (solnic)
v1.0.2
v1.0.1
v1.0.0
Changed
- [BREAKING]
Result#to_hash
was removed (solnic)
Fixed
- Setting
:any
as the type spec no longer crashes (solnic) Result#error?
handles paths to array elements correctly (solnic)
v0.6.0
Changed
- Dependency on
dry-types
was bumped to~> 1.0
(solnic) - Dependency on
dry-logic
was bumped to~> 1.0
(solnic) - Dependency on
dry-initializer
was bumped to~> 3.0
(solnic)