Sha256: b760fe3ee3cc91a40bbc6bcf1c9287ee24eb6bb4f0666329efea6dffbb72340d

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require 'grape-swagger-rails/engine'

module GrapeSwaggerRails
  class Options < OpenStruct
    def before_filter(&block)
      if block_given?
        self.before_filter_proc = block
      else
        before_filter_proc
      end
    end
  end

  mattr_accessor :options

  self.options = Options.new(

    url:                  '/swagger_doc',
    app_name:             'Swagger',
    app_url:              'http://swagger.wordnik.com',

    headers:              {},

    api_auth:             '',        # 'basic' or 'bearer'
    api_key_name:         'api_key', # 'Authorization'
    api_key_type:         'query',   # 'header'

    doc_expansion:        'none',

    before_filter_proc:   nil # Proc used as a controller before filter
  )
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape-swagger-rails-0.2.0 lib/grape-swagger-rails.rb