Sha256: cc8ce65309de6bdab71d68b9393472398de8c111b3bb7143f31acbdcc9bd6f15

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

require "sinatra/multi_route"
require "sinatra/swagger/swagger_linked"

module Sinatra
  module Swagger
    module SpecVerb
      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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra-swagger-0.4.2 lib/sinatra/swagger/spec_verb.rb
sinatra-swagger-0.4.1 lib/sinatra/swagger/spec_verb.rb
sinatra-swagger-0.4.0 lib/sinatra/swagger/spec_verb.rb