Module: Sinatra::Swagger::SpecVerb

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

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/sinatra/swagger/spec_verb.rb', line 7

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

  app.route 'SPEC', '/' do
    content_type "text/vnd.swagger.v2+yaml; charset=utf-8"
    YAML.dump(settings.swagger.spec)
  end
end