class Schemacop::V3::AnyOfNode
Public Instance Methods
_validate(data, result:)
click to toggle source
Calls superclass method
# File lib/schemacop/v3/any_of_node.rb, line 8 def _validate(data, result:) super_data = super return if super_data.nil? match = match(super_data) if match match._validate(super_data, result: result) else result.error 'Does not match any anyOf condition.' end end
type()
click to toggle source
# File lib/schemacop/v3/any_of_node.rb, line 4 def type :anyOf end
validate_self()
click to toggle source
# File lib/schemacop/v3/any_of_node.rb, line 21 def validate_self if @items.empty? fail 'Node "any_of" makes only sense with at least 1 item.' end end