Module: OpenAPIParser::Parser

Included in:
Schemas::Base
Defined in:
lib/openapi_parser/concerns/parser.rb,
lib/openapi_parser/concerns/parser.rb

Defined Under Namespace

Modules: ClassMethods, Hash, HashBody, List, Object, Value Classes: Core

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



10
11
12
# File 'lib/openapi_parser/concerns/parser.rb', line 10

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#_openapi_all_child_objectsHash{String => OpenAPIParser::Schemas::Base}

Returns:



34
35
36
# File 'lib/openapi_parser/concerns/parser.rb', line 34

def _openapi_all_child_objects
  @_openapi_all_child_objects ||= {}
end

#_update_child_object(old, new) ⇒ Object



29
30
31
# File 'lib/openapi_parser/concerns/parser.rb', line 29

def _update_child_object(old, new)
  _openapi_all_child_objects[old.object_reference] = new
end

#load_dataObject

load data by schema definition in core and set children to _openapi_all_child_objects

Returns:

  • nil



40
41
42
43
44
# File 'lib/openapi_parser/concerns/parser.rb', line 40

def load_data
  loader = ::OpenAPIParser::SchemaLoader.new(self, self.class._parser_core)
  @_openapi_all_child_objects = loader.load_data
  nil
end