Class: OpenapiValidator::ResponseValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_validator/response_validator.rb,
lib/openapi_validator/response_validators/json_validator.rb,
lib/openapi_validator/response_validators/image_validator.rb

Defined Under Namespace

Classes: ImageValidator, JsonValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



7
8
9
# File 'lib/openapi_validator/response_validator.rb', line 7

def errors
  @errors
end

Class Method Details

.call(**params) ⇒ Object



13
14
15
# File 'lib/openapi_validator/response_validator.rb', line 13

def self.call(**params)
  new(**params).call
end

Instance Method Details

#callObject



17
18
19
20
# File 'lib/openapi_validator/response_validator.rb', line 17

def call
  validate_response
  self
end

#valid?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/openapi_validator/response_validator.rb', line 9

def valid?
  errors.empty?
end