Class: Liminal::Openapi::Verification::InvalidDocumentError

Inherits:
Error
  • Object
show all
Defined in:
lib/liminal/openapi/verification/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, errors) ⇒ InvalidDocumentError

Returns a new instance of InvalidDocumentError.



32
33
34
35
36
# File 'lib/liminal/openapi/verification/error.rb', line 32

def initialize(path, errors)
  @path = path
  @errors = errors
  super("OpenAPI validation failed for #{path}:\n#{format_errors(errors)}")
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



30
31
32
# File 'lib/liminal/openapi/verification/error.rb', line 30

def errors
  @errors
end

#pathObject (readonly)

Returns the value of attribute path.



30
31
32
# File 'lib/liminal/openapi/verification/error.rb', line 30

def path
  @path
end