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.



158
159
160
161
162
163
# File 'lib/openapi_parser/errors.rb', line 158

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

Instance Method Details

#messageObject



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

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