Class: OpenAPIParser::SchemaValidator::ResponseValidateOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_parser/schema_validators/options.rb

Overview

response body validation option

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strict: false, validate_header: true) ⇒ ResponseValidateOptions

Returns a new instance of ResponseValidateOptions.



24
25
26
27
# File 'lib/openapi_parser/schema_validators/options.rb', line 24

def initialize(strict: false, validate_header: true)
  @strict = strict
  @validate_header = validate_header
end

Instance Attribute Details

#strictBoolean (readonly)

Returns validate by strict (when not exist definition, raise error).

Returns:

  • (Boolean)

    validate by strict (when not exist definition, raise error)



22
23
24
# File 'lib/openapi_parser/schema_validators/options.rb', line 22

def strict
  @strict
end

#validate_headerObject (readonly)

Returns the value of attribute validate_header.



22
23
24
# File 'lib/openapi_parser/schema_validators/options.rb', line 22

def validate_header
  @validate_header
end