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.
8 9 10 11 |
# File 'lib/swagger_docs_generator/metadata/jsons.rb', line 8 def initialize @paths = { paths: {} } = [] end |
Instance Method Details
#construct_swagger_file ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/swagger_docs_generator/metadata/jsons.rb', line 13 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(sort_paths).merge(tags: ) end |