Class: OpenapiFirst::Schema::ValidationError
- Inherits:
-
Object
- Object
- OpenapiFirst::Schema::ValidationError
- Defined in:
- lib/openapi_first/schema/validation_error.rb
Overview
One of multiple validation errors. Returned by Schema::ValidationResult#errors.
Instance Method Summary collapse
- #details ⇒ Object
- #error ⇒ Object (also: #message)
-
#initialize(json_schemer_error) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #instance_location ⇒ Object
- #schema_location ⇒ Object
- #schemer_error ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(json_schemer_error) ⇒ ValidationError
Returns a new instance of ValidationError.
7 8 9 |
# File 'lib/openapi_first/schema/validation_error.rb', line 7 def initialize(json_schemer_error) @error = json_schemer_error end |
Instance Method Details
#details ⇒ Object
17 |
# File 'lib/openapi_first/schema/validation_error.rb', line 17 def details = @error['details'] |
#error ⇒ Object Also known as: message
11 |
# File 'lib/openapi_first/schema/validation_error.rb', line 11 def error = @error['error'] |
#instance_location ⇒ Object
14 |
# File 'lib/openapi_first/schema/validation_error.rb', line 14 def instance_location = @error['data_pointer'] |
#schema_location ⇒ Object
15 |
# File 'lib/openapi_first/schema/validation_error.rb', line 15 def schema_location = @error['schema_pointer'] |
#schemer_error ⇒ Object
13 |
# File 'lib/openapi_first/schema/validation_error.rb', line 13 def schemer_error = @error |
#type ⇒ Object
16 |
# File 'lib/openapi_first/schema/validation_error.rb', line 16 def type = @error['type'] |