Class: EasyTalk::ErrorFormatter::JsonPointer
- Defined in:
- lib/easy_talk/error_formatter/json_pointer.rb
Overview
Formats validation errors using JSON Pointer (RFC 6901) paths.
Converts attribute paths to JSON Pointer format pointing to the property location in the JSON Schema.
Instance Method Summary collapse
-
#format ⇒ Array<Hash>
Format the errors as an array with JSON Pointer paths.
Constructor Details
This class inherits a constructor from EasyTalk::ErrorFormatter::Base
Instance Method Details
#format ⇒ Array<Hash>
Format the errors as an array with JSON Pointer paths.
20 21 22 23 24 |
# File 'lib/easy_talk/error_formatter/json_pointer.rb', line 20 def format error_entries.map do |entry| build_error_object(entry) end end |