dry-struct icon indicating copy to clipboard operation
dry-struct copied to clipboard

Typed struct and value objects

Results 9 dry-struct issues
Sort by recently updated
recently updated
newest added

It fixes #171 ### Few notes about this fix: - The assumption here is that `@attributes` are already validated, so no need to go to schema and check if given...

## Describe the bug When nesting a dry struct in another dry struct through a Hash attribute, dry errors in the nested struct are not raised as dry errors, but...

bug
help wanted

I all :) hope it is the right place to post. ## Describe the bug i tried to access struct attributes using the hash syntax and i found out different...

bug
help wanted

## Describe the bug [Dry::Struct::ClassInterface#define_accessors](https://github.com/dry-rb/dry-struct/blob/master/lib/dry/struct/class_interface.rb#L480) naively consumes attribute value in eval block. If the name contains a single space, second word becomes a parameter. If argument contains special symbols, `SyntaxError`...

bug
help wanted

## Describe the bug When I have a field that’s required, but its value is a maybe (attribute :missing, Types::String.maybe` for example) not passing that field does not fail when...

bug
help wanted

## Describe the bug When you try to pass subsclasses of parent class to attribute, dry-struct doesn't parse them as subsclases. ## To Reproduce Here is a code sample: ```ruby...

bug
help wanted

## Describe the bug Given the following code: ```ruby module Types include Dry.Types Fruit = String.enum("apple", "banana", "pear") end class FruitScore < Dry::Struct attribute :fruit, Types::Fruit attribute :score, Types::Integer.constrained(gteq: 1,...

bug
help wanted