Class: R2OAS::Schema::V3::ComponentsCleaner

Inherits:
BaseCleaner show all
Defined in:
lib/r2-oas/schema/v3/cleaner/components_cleaner.rb

Constant Summary

Constants inherited from Base

Base::SUPPORT_COMPONENTS_OBJECTS

Instance Method Summary collapse

Methods inherited from Base

#support_components_objects

Constructor Details

#initialize(options = {}) ⇒ ComponentsCleaner

Returns a new instance of ComponentsCleaner.



10
11
12
13
14
# File 'lib/r2-oas/schema/v3/cleaner/components_cleaner.rb', line 10

def initialize(options = {})
  super
  @components_file_paths = Dir.glob("#{schema_save_dir_path}/components/**/**.yml")
  @security_schemes_paths = Dir.glob("#{schema_save_dir_path}/components/securitySchemes/**/**.yml")
end

Instance Method Details

#clean_docsObject



16
17
18
19
20
21
22
# File 'lib/r2-oas/schema/v3/cleaner/components_cleaner.rb', line 16

def clean_docs
  logger.info '[Clean OAS file (components)] start'
  super do |file_path|
    logger.info "  Delete schema file: \t#{file_path}"
  end
  logger.info '[Clean OAS file (components)] end'
end