Class: R2OAS::Schema::V3::Squeezer
- Inherits:
-
BaseSqueezer
- Object
- Base
- Base
- Base
- BaseSqueezer
- R2OAS::Schema::V3::Squeezer
- Defined in:
- lib/r2-oas/schema/v3/squeezer.rb
Constant Summary
Constants inherited from Base
Base::SUPPORT_COMPONENTS_OBJECTS
Instance Method Summary collapse
Methods inherited from BaseSqueezer
Methods inherited from Base
Methods inherited from Base
Constructor Details
This class inherits a constructor from R2OAS::Schema::V3::BaseSqueezer
Instance Method Details
#squeeze_docs ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/r2-oas/schema/v3/squeezer.rb', line 11 def squeeze_docs except_paths_schema = @schema_data.except('paths', 'tags', 'components') components_schemas = @schema_data.slice('components') path_squeezer = PathSqueezer.new(@schema_data, many_paths_file_paths: many_paths_file_paths) tag_squeezer = TagSqueezer.new(@schema_data, many_paths_file_paths: many_paths_file_paths) # To make components merge after paths slice_schemas = [ tag_squeezer.squeeze_docs, path_squeezer.squeeze_docs, components_schemas ] slice_schemas.each_with_object(except_paths_schema) { |slice_schema, result| result.deep_merge!(slice_schema) } end |