We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, thanks for fixing #97, but I believe the issue is either deeper or I'm not properly using schema with custom types. Here is my example:
require 'mongo' module Types include Dry::Types.module BSONObjectId = Definition(BSON::ObjectId) .constructor(->(val){ BSON::ObjectId(val) }) .constrained(type: BSON::ObjectId) end Dry::Schema.Params do required(:template_id).filled(Types::BSONObjectId) end
It raises a similar error:
Predicate +:objectid?+ inferred from #<Dry::Types::Constrained::Coercible type=#<Dry::Types::Constructor type=#<Dry::Types::Definition primitive=BSON::ObjectId options={} meta={}> options={:fn=>#<Proc:0x000055ad1b4f8918@/home/konstantin/source/sandbox/rom-kd/main.rb:11 (lambda)>} meta={}> options={:rule=>#<Dry::Logic::Rule::Predicate predicate=#<Method: Dry::Logic::Predicates.type?> options={:args=>[BSON::ObjectId]}>} rule=#<Dry::Logic::Rule::Predicate predicate=#<Method: Dry::Logic::Predicates.type?> options={:args=>[BSON::ObjectId]}> meta={}> type spec is not supported (ArgumentError)
The text was updated successfully, but these errors were encountered:
oh I need to add support for custom types
Sorry, something went wrong.
solnic
No branches or pull requests
Hi, thanks for fixing #97, but I believe the issue is either deeper or I'm not properly using schema with custom types. Here is my example:
It raises a similar error:
The text was updated successfully, but these errors were encountered: