Module: OpenAPIParser::ParameterValidatable

Included in:
Schemas::Operation
Defined in:
lib/openapi_parser/concerns/parameter_validatable.rb

Instance Method Summary collapse

Instance Method Details

#set_parent_path_item(path_item) ⇒ Object

Parameters:

  • path_item (PathItem)

    parent



17
18
19
20
# File 'lib/openapi_parser/concerns/parameter_validatable.rb', line 17

def set_parent_path_item(path_item)
  @merged_parameter = (parameters || []) + (path_item.parameters || [])
  nil
end

#validate_path_params(path_params, options) ⇒ Object

Parameters:



4
5
6
# File 'lib/openapi_parser/concerns/parameter_validatable.rb', line 4

def validate_path_params(path_params, options)
  OpenAPIParser::ParameterValidator.validate_parameter(path_parameter_hash, path_params, object_reference, options)
end

#validate_request_parameter(params, headers, options) ⇒ Object

Parameters:



11
12
13
14
# File 'lib/openapi_parser/concerns/parameter_validatable.rb', line 11

def validate_request_parameter(params, headers, options)
  validate_header_parameter(headers, object_reference, options) if options.validate_header
  validate_query_parameter(params, object_reference, options)
end