Class: OpenapiRspec::DocumentationValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_rspec/documentation_validator.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



10
11
12
# File 'lib/openapi_rspec/documentation_validator.rb', line 10

def description
  "be a valid OpenAPI documentation"
end

#failure_messageObject



14
15
16
# File 'lib/openapi_rspec/documentation_validator.rb', line 14

def failure_message
  @result.errors.join("\n")
end

#matches?(doc) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/openapi_rspec/documentation_validator.rb', line 5

def matches?(doc)
  @result = doc.validate_documentation
  @result.valid?
end