Class: R2OAS::Schema::V3::ComponentsGenerator
- Inherits:
-
BaseGenerator
- Object
- Base
- Base
- Base
- BaseGenerator
- R2OAS::Schema::V3::ComponentsGenerator
- Defined in:
- lib/r2-oas/schema/v3/generator/components_generator.rb
Constant Summary
Constants inherited from Base
Base::SUPPORT_COMPONENTS_OBJECTS
Instance Method Summary collapse
- #generate_docs ⇒ Object
-
#initialize(schema_data = {}, options = {}) ⇒ ComponentsGenerator
constructor
A new instance of ComponentsGenerator.
Methods included from R2OAS::Sortable
Methods inherited from Base
Constructor Details
#initialize(schema_data = {}, options = {}) ⇒ ComponentsGenerator
Returns a new instance of ComponentsGenerator.
11 12 13 14 15 |
# File 'lib/r2-oas/schema/v3/generator/components_generator.rb', line 11 def initialize(schema_data = {}, = {}) super() @components = schema_data['components'] || scehma_data[:components] = end |
Instance Method Details
#generate_docs ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/r2-oas/schema/v3/generator/components_generator.rb', line 17 def generate_docs support_components_objects.each do |object_name| generator_class(object_name).new(@components, .merge( middle_category: object_name )).generate_docs end end |