I have a struct with an attribute the only thing I know about it is that it is going to be a Hash with string/symbol keys. I would like to coerce all its keys to symbols on initialization.
As far as I see, right now it is not possible to do that with dry-types.
Types::Coercible::Hash has nothing to do with coercing string keys to symbol, while there is no hash schema suited for this scenario. The only one that symbolizes keys is
Types::Hash.symbolized, but it ignores keys not defined in the schema, and I don't know which keys are going to be present.
Am I missing something? If not, would you consider adding this to dry-types? If so, how do you think it should be added? As an option to
Types::Hash? As a new schema type?
Thanks in advance