Class: R2OAS::Schema::V3::ComponentsAnalyzer

Inherits:
BaseAnalyzer show all
Defined in:
lib/r2-oas/schema/v3/analyzer/components_analyzer.rb

Constant Summary

Constants inherited from Base

Base::SUPPORT_COMPONENTS_OBJECTS

Instance Method Summary collapse

Methods inherited from BaseAnalyzer

#generate_from_existing_schema

Methods included from R2OAS::Sortable

#deep_sort

Methods inherited from Base

#support_components_objects

Constructor Details

#initialize(before_schema_data, after_schema_data, options = {}) ⇒ ComponentsAnalyzer



11
12
13
14
# File 'lib/r2-oas/schema/v3/analyzer/components_analyzer.rb', line 11

def initialize(before_schema_data, after_schema_data, options = {})
  super
  @options = options
end

Instance Method Details

#analyze_docsObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/r2-oas/schema/v3/analyzer/components_analyzer.rb', line 16

def analyze_docs
  support_components_objects.each do |object_name|
    logger.info "[Analyze OAS file (components/#{object_name})] start"
    Components::ObjectAnalyzer.new(
      @before_schema_data,
      @after_schema_data,
      @options.merge(middle_category: object_name)
    ).analyze_docs
    logger.info "[Analyze OAS file (components/#{object_name})] end"
  end
end