How to define a schema for hashes with non Symbol/String keys

I’m trying to validate the following shape:

{
  tag: :locations,
  paths: {
    [%w[in near], %w[me us]] => { current_location: true, tag: 'Location' },
    [%w[in near], %w[my our], %w[area town community city island state]] => { current_location: true, tag: 'Location' },
    [%w[on], %w[my our], %w[island]] => { current_location: true, tag: 'Location' }
  },
},

You’ll note that the value for :paths is a Hash will Array keys. How would validating this work?

Thank you!

You can represent this with dry-types, like

Types = Dry.Types(default: :strict)

module Types
  Location = Hash.schema(current_location: Bool, tag: String)
  Paths = Map(Array.of(Array.of(String)), Location)
end

However, dry-schema does not support the Map type so this would not work in a schema.

Thank you!