Method: SimpleJSONSchema::Checker.unique_items
- Defined in:
- lib/simple_json_schema/checker.rb
.unique_items(scope) ⇒ Object
28 29 30 31 |
# File 'lib/simple_json_schema/checker.rb', line 28 def unique_items(scope) value = scope.value scope.error(:uniqueItems) if scope[:uniqueItems] && value.size != value.uniq.size end |