Sha256: ddd27a49d58df49317b67e4d5f6cce91fd4491ebe5e90dc668bdeb4845c617f2

Contents?: true

Size: 382 Bytes

Versions: 21

Compression:

Stored size: 382 Bytes

Contents

require 'rails/generators'

module Rswag
  module Api

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

      def add_initializer
        template('rswag_api.rb', 'config/initializers/rswag_api.rb')
      end

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rswag-api-2.16.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.15.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.14.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.13.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.12.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.11.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.10.1 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.10.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.9.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.8.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.7.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.6.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.5.1 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.5.1.rc1 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.5.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.5.0.rc1 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.4.0 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.3.3 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.3.2 lib/generators/rswag/api/install/install_generator.rb
rswag-api-2.3.1 lib/generators/rswag/api/install/install_generator.rb