Nikita Shilnikov

Results 163 comments of Nikita Shilnikov

Why not having something like `.JSONArray` instead? It would be easier to implement IMO

besides, the biggest problem I think is producing error messages, not the DSL part

For anyone in the future, before using `catch`/`throw` pls consult me :) Maybe we'll be able to find a better solution.

@solnic yeahyeah sure, I just mean using `catch`/`throw` without a real need may have undesirable consequences. And even though this doesn't seem to be the case here, I'd like to...

> Simplify Or::MultiPath.handler to just use a case statement. The hash-based dispatch was unnecessarily complex. Now `:itself.to_proc` and `.method(:new)` are called on every call of `.handler`, their results should be...

> TIL 😁 I wouldn't count on Ruby too much in these aspects. They tend to tighten things a bit but it takes time. I'm pretty sure there's not much...

It works when written as `maybe([Types::JSON::Decimal, Types::Params::Nil])`

@solnic no clue, if it was _decided_ at some point I would follow the commits

@solnic `maybe(:hash)` should use `Types::Params::Nil | Types::Params::Hash` or smth like this, it's `Types::Params::Nil`'s job to coerce to `nil`, no?

You can pre-transform input like ```ruby transformed = { values: input.to_h { |key, value| { key: key, value: value } } } ``` ```ruby Schema = Dry::Schema.JSON do required(:values).array(:hash) do...