Sha256: dc1f054d8c72e63a06db5ff96559ca8e21107c8b8d48b3ebd89b40ee6041e593

Contents?: true

Size: 877 Bytes

Versions: 1

Compression:

Stored size: 877 Bytes

Contents

# frozen_string_literal: true

# :reek:UtilityFunction
module SwaggerDocsGenerator
  # # Methods for controller
  #
  # Methods adding to controller parsing in rails appliation
  module Methods
    # Create json file for controller
    def swagger_controller(controller, description)
      parse = ParserController.new(controller, description)
      parse.adding_tag
    end

    # Complete json file with datas to method and controller, controller reading
    def swagger_doc(controller, action, data = {})
      parse = ParserAction.new(controller, action, data)
      parse.adding_path
    end

    def swagger_definition(controller, name, parameters)
      parse = ParserDefinition.new(controller, name, parameters)
      parse.adding_defintion
    end

    alias scontroller swagger_controller
    alias sdoc swagger_doc
    alias sdefinition swagger_definition
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swagger_docs_generator-0.2.0.pre.12 lib/swagger_docs_generator/methods.rb