Class: SwaggerDocsGenerator::MetadataJsons
- Inherits:
-
Object
- Object
- SwaggerDocsGenerator::MetadataJsons
- Defined in:
- lib/swagger_docs_generator/metadata/jsons.rb
Overview
Parse temporary json files
Instance Method Summary collapse
- #construct_swagger_file ⇒ Object
-
#initialize ⇒ MetadataJsons
constructor
A new instance of MetadataJsons.
Constructor Details
#initialize ⇒ MetadataJsons
Returns a new instance of MetadataJsons.
6 7 8 9 |
# File 'lib/swagger_docs_generator/metadata/jsons.rb', line 6 def initialize @paths = { paths: {} } = [] end |
Instance Method Details
#construct_swagger_file ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/swagger_docs_generator/metadata/jsons.rb', line 11 def construct_swagger_file hash = {} files_tmp.each do |file| @paths[:paths].merge!(read_part_json(file, 'paths')) .push read_part_json(file, 'tags') end hash.merge(@paths).merge(tags: ) end |