Class: OpenapiFirst::Schema::ValidationError

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_first/schema/validation_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(json_schemer_error) ⇒ ValidationError

Returns a new instance of ValidationError.



6
7
8
# File 'lib/openapi_first/schema/validation_error.rb', line 6

def initialize(json_schemer_error)
  @error = json_schemer_error
end

Instance Method Details

#detailsObject



15
# File 'lib/openapi_first/schema/validation_error.rb', line 15

def details = @error['details']

#errorObject



10
# File 'lib/openapi_first/schema/validation_error.rb', line 10

def error = @error['error']

#instance_locationObject



12
# File 'lib/openapi_first/schema/validation_error.rb', line 12

def instance_location = @error['data_pointer']

#schema_locationObject



13
# File 'lib/openapi_first/schema/validation_error.rb', line 13

def schema_location = @error['schema_pointer']

#schemer_errorObject



11
# File 'lib/openapi_first/schema/validation_error.rb', line 11

def schemer_error = @error

#typeObject



14
# File 'lib/openapi_first/schema/validation_error.rb', line 14

def type = @error['type']