According to the web documentation:
The DSL accepts any
Dry::Types::Type
object
I have a type defined simliar to this:
module Types
include Dry::Types(default: :nominal)
Metadata = Strict::Hash.optional
Href = Strict::String | Hash.schema(href: Strict::String, meta: Metadata)
Links = Map(Symbol, Href)
end
I’m defining a schema as the docs suggest:
schema = Dry::Schema.JSON do
required(:links).value(Types::Links)
end
which results in this error:
NoMethodError: undefined method `visit_map' for #<Dry::Schema::PredicateInferrer::Compiler:0x00007ff619665500>
What am I doing wrong here?