Module: Sinatra::Swagger::VersionHeader

Defined in:
lib/sinatra/swagger/version_header.rb

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object


6
7
8
9
10
11
12
# File 'lib/sinatra/swagger/version_header.rb', line 6

def self.registered(app)
  app.register Swagger::SwaggerLinked

  app.before do
    headers['X-Application-Version'] = "#{settings.swagger['info']['title']} (#{settings.swagger['info']['version']})"
  end
end