Exception: OpenAPIParser::InvalidPattern

Inherits:
OpenAPIError
  • Object
show all
Defined in:
lib/openapi_parser/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, pattern, reference, example) ⇒ InvalidPattern

Returns a new instance of InvalidPattern.



164
165
166
167
168
169
# File 'lib/openapi_parser/errors.rb', line 164

def initialize(value, pattern, reference, example)
  super(reference)
  @value = value
  @pattern = pattern
  @example = example
end

Instance Method Details

#messageObject



171
172
173
# File 'lib/openapi_parser/errors.rb', line 171

def message
  "#{@reference} pattern #{@pattern} does not match value: #{@value.inspect}#{@example ? ", example: #{@example}" : ""}"
end