Exception: OpenAPIParser::ValidateError
- Inherits:
-
OpenAPIError
- Object
- StandardError
- OpenAPIError
- OpenAPIParser::ValidateError
- Defined in:
- lib/openapi_parser/errors.rb
Class Method Summary collapse
-
.build_error_result(value, schema) ⇒ Object
create ValidateError for SchemaValidator return data.
Instance Method Summary collapse
-
#initialize(data, type, reference) ⇒ ValidateError
constructor
A new instance of ValidateError.
- #message ⇒ Object
Constructor Details
#initialize(data, type, reference) ⇒ ValidateError
Returns a new instance of ValidateError.
9 10 11 12 13 |
# File 'lib/openapi_parser/errors.rb', line 9 def initialize(data, type, reference) super(reference) @data = data @type = type end |
Class Method Details
.build_error_result(value, schema) ⇒ Object
create ValidateError for SchemaValidator return data
23 24 25 |
# File 'lib/openapi_parser/errors.rb', line 23 def build_error_result(value, schema) [nil, OpenAPIParser::ValidateError.new(value, schema.type, schema.object_reference)] end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/openapi_parser/errors.rb', line 15 def "#{@data} class is #{@data.class} but it's not valid #{@type} in #{@reference}" end |