Class: R2OAS::Schema::V3::DocGenerator

Inherits:
BaseGenerator show all
Defined in:
lib/r2-oas/schema/v3/generator/doc_generator.rb

Constant Summary

Constants inherited from Base

Base::SUPPORT_COMPONENTS_OBJECTS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from R2OAS::Sortable

#deep_sort

Methods inherited from Base

#support_components_objects

Constructor Details

#initialize(options = {}) ⇒ DocGenerator

Returns a new instance of DocGenerator.



14
15
16
17
# File 'lib/r2-oas/schema/v3/generator/doc_generator.rb', line 14

def initialize(options = {})
  super
  @schema_generator = SchemaGenerator.new(options)
end

Instance Attribute Details

#oas_docObject

Returns the value of attribute oas_doc.



12
13
14
# File 'lib/r2-oas/schema/v3/generator/doc_generator.rb', line 12

def oas_doc
  @oas_doc
end

Instance Method Details

#generate_docsObject



19
20
21
22
23
24
25
26
# File 'lib/r2-oas/schema/v3/generator/doc_generator.rb', line 19

def generate_docs
  logger.info '[Generate OAS schema files] start'
  @schema_generator.generate_docs unless skip_generate_docs
  logger.info '[Generate OAS schema files] end'
  logger.info '[Generate OAS docs from schema files] start'
  generate_docs_from_schema_files
  logger.info '[Generate OAS docs from schema files] end'
end