gitlab-org--gitlab-foss/lib/tasks/grape.rake

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
391 B
Ruby
Raw Normal View History

# frozen_string_literal: true
namespace :grape do
desc 'Print compiled grape routes'
task routes: :environment do
API::API.routes.each do |route|
puts "#{route.options[:method]} #{route.path} - #{route_description(route.options)}"
end
end
def route_description(options)
2017-02-07 05:00:47 -05:00
options[:settings][:description][:description] if options[:settings][:description]
end
end