These are chat archives for dry-rb/chat

Apr 2017
Oskar Szrajer
Apr 13 2017 10:03
yaks will work, I use yaks in one project
but it doesn't support JSON-API in 100%
Sergey Kukunin
Apr 13 2017 11:28
Is there a way to build validation schema from dry-struct? Something like Dry::Validation.Schema(MyStruct.schema). I want to get all violation that prevents coercion data to MyStruct, and don't want to duplicate all attributes in a schema
Currently I do
def errors_for(attributes)
rescue => e
but this gives an error by error
Sergey Kukunin
Apr 13 2017 12:07
  • error is not formatted
Piotr Solnica
Apr 13 2017 16:59
@Kukunin Dry::Validation.Schema(MyStruct) this should work, but it’s in alpha state
just try