Class: OpenAPIParser::SchemaValidator::ResponseValidateOptions

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

Overview

response body validation option

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ResponseValidateOptions.



27
28
29
30
31
# File 'lib/openapi_parser/schema_validator/options.rb', line 27

def initialize(strict: false, validate_header: true, **validator_options)
  @validator_options = validator_options
  @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)



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

def strict
  @strict
end

#validate_headerObject (readonly)

Returns the value of attribute validate_header.



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

def validate_header
  @validate_header
end

#validator_optionsObject (readonly)

Returns the value of attribute validator_options.



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

def validator_options
  @validator_options
end