Class: OpenAPIParser::Schemas::Parameter

Inherits:
Base
  • Object
show all
Defined in:
lib/openapi_parser/schemas/classes.rb,
lib/openapi_parser/schemas/parameter.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#object_reference, #parent, #raw_schema, #root

Instance Method Summary collapse

Methods inherited from Base

#after_init, #initialize, #inspect

Methods included from Expandable

#expand_reference

Methods included from Findable

#find_object, #purge_object_cache

Methods included from Parser

#_openapi_all_child_objects, #_update_child_object, included, #load_data

Constructor Details

This class inherits a constructor from OpenAPIParser::Schemas::Base

Instance Attribute Details

#schemaSchema, ... (readonly)

Returns:



12
# File 'lib/openapi_parser/schemas/parameter.rb', line 12

openapi_attr_object :schema, Schema, reference: true

Instance Method Details

#validate_params(params, options) ⇒ Object

Returns coerced or original params.

Parameters:

Returns:

  • (Object)

    coerced or original params



16
17
18
# File 'lib/openapi_parser/schemas/parameter.rb', line 16

def validate_params(params, options)
  ::OpenAPIParser::SchemaValidator.validate(params, schema, options)
end