Module: OpenAPIParser::Parser::HashBody

Included in:
Core
Defined in:
lib/openapi_parser/concerns/parser/hash_body.rb

Instance Method Summary collapse

Instance Method Details

#_openapi_attr_hash_body_objectsObject



2
3
4
# File 'lib/openapi_parser/concerns/parser/hash_body.rb', line 2

def _openapi_attr_hash_body_objects
  @_openapi_attr_hash_body_objects ||= {}
end

#openapi_attr_hash_body_objects(name, klass, options = {}) ⇒ Object



6
7
8
9
10
11
# File 'lib/openapi_parser/concerns/parser/hash_body.rb', line 6

def openapi_attr_hash_body_objects(name, klass, options = {})
  # options[:reject_keys] = options[:reject_keys] ? options[:reject_keys].map(&:to_s) : []

  target_klass.send(:attr_reader, name)
  _openapi_attr_hash_body_objects[name] = ::OpenAPIParser::SchemaLoader::HashBodyLoader.new(name, options.merge(klass: klass))
end