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.



186
187
188
189
190
191
# File 'lib/openapi_parser/errors.rb', line 186

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

Instance Method Details

#messageObject



193
194
195
# File 'lib/openapi_parser/errors.rb', line 193

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