Sha256: ab88724e33438f62ddfa0e4235af660c96091bd8c1735632913cb342af7fd06b

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

require 'rails/generators'

module Rswag3
  module Ui

    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      def add_initializer
        template('rswag3-ui.rb', 'config/initializers/rswag3-ui.rb')
      end

      def add_routes
        route("mount Rswag3::Ui::Engine => '/api-docs'")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rswag3-ui-0.0.2 lib/generators/rswag3/ui/install/install_generator.rb
rswag3-ui-0.0.1 lib/generators/rswag3/ui/install/install_generator.rb