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.



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

def errors
  @errors
end

Class Method Details

.call(**params) ⇒ Object



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

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

Instance Method Details

#callObject



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

def call
  validate_response
  self
end

#valid?Boolean

Returns:

  • (Boolean)


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

def valid?
  errors.empty?
end