Allow for extra keys in the schema/collection even when passing strict: true to #validate!
Allow for extra keys in collection
class MyMedia include MediaTypes::Dsl validations do collection :foo do attribute :required, String not_strict end end end MyMedia.valid?({ foo: [{ required: 'test', bar: 42 }] }) # => true
See Also:
309 310 311
# File 'lib/media_types/scheme.rb', line 309 def not_strict rules.default = NotStrict.new end