class R2OAS::Schema::V3::FromFiles::BaseObject

Attributes

opts[RW]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 24
def initialize(opts = {})
  @opts = opts
  plugins = app_configuration_options[:plugins]
  @plugin_executor = ::R2OAS::Plugin::Executor.new(plugins, opts)
end
obj_store() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 17
def obj_store
  ::R2OAS::Schema::V3::Store.create(:obj)
end

Public Instance Methods

to_doc() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 30
def to_doc
  raise 'Implement Inherit Class'
end

Private Instance Methods

app_configuration_options() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 53
def app_configuration_options
  R2OAS.app_configuration_options
end
obj_store() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 36
def obj_store
  self.class.obj_store
end
root_doc() click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 44
def root_doc
  obj_store.root_doc
end
set_components_name_list(root_doc) click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 48
def set_components_name_list(root_doc)
  obj_store.components_schema_name_list = (root_doc.fetch('components', nil)&.fetch('schemas', nil) || {}).keys.sort.uniq
  obj_store.components_request_body_name_list = (root_doc.fetch('components', nil)&.fetch('schemas', nil) || {}).keys.sort.uniq
end
set_root_doc(root_doc) click to toggle source
# File lib/r2-oas/schema/v3/object/from_files/base_object.rb, line 40
def set_root_doc(root_doc)
  obj_store.root_doc = root_doc.dup
end