Sha256: a4e2ea46bafa9285e882f16dcacc454df9e31f0520b42e2905a77c70776a3348
Contents?: true
Size: 649 Bytes
Versions: 8
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true module SwaggerDocsGenerator # # Metadata generated # # Generate metadata for block paths in swagger specification # # @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathsObject class MetadataPath < MetadataController def initialize super end # Each controller parsed def construct_swagger_file hash = {} controllers.each do |controller| file = File.join(file_path, "#{controller.controller_name}.json") hash.merge!(JSON.parse(File.read(file))['paths']) if File.exist?(file) end { paths: hash } end end end
Version data entries
8 entries across 8 versions & 1 rubygems