Peter Solnica
Peter Solnica
This works in 1.10.1: ```ruby require "dry/schema" Schema1 = Dry::Schema.Params do required(:date1).value(:date_time) end Schema2 = Dry::Schema.Params do required(:date2).value(:date_time) end Container = Dry::Schema.Params do optional(:foo).array(:hash, Schema1 | Schema2) end puts Container.(foo:...
Thanks for reporting this. Benchmarking is hard though - they way you wrote it makes it much faster in case of AM because you initialized the form just once, in...
Hey, this is not supported, but that's an interesting use case. Is there a limit how deep this can go?
@vrtsev this is something that we can consider to add in the future. We'll see if more people ask about it. ps. I moved your issue from dry-validation to dry-schema...
@flash-gordon I can reproduce it, make sure you have expected gem versions loaded: ``` irb(main):011:0> Class.new(Dry::Validation::Contract) { params { required(:list).array(Dry.Struct(name: 'string')) } }.new.call(list: []) => #{}} errors={:list=>["must be an array"]}>...
@flash-gordon ah sorry, yeah so the inferred type must be wrong then
> BTW the docs are only at 1.0 on the dry-struct website, and the struct extension is not listed on the dry-schema website either. Should there be a new version...
Thanks for the report. With the `maybe` method though, the expected type is `["nil", "integer"]` in this case, `required` key in the meta data means the key is optional, it's...
@carbroj yes this will be done eventually. Marking as "help wanted" for now.
This was finally fixed in 1.10.5