Module: OpenAPIParser::Parser::HashBody
- Included in:
- Core
- Defined in:
- lib/openapi_parser/concerns/parser/hash_body.rb
Instance Method Summary collapse
- #_openapi_attr_hash_body_objects ⇒ Object
- #openapi_attr_hash_body_objects(name, klass, options = {}) ⇒ Object
Instance Method Details
#_openapi_attr_hash_body_objects ⇒ Object
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[: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, .merge(klass: klass)) end |