gitlabhq/lib/api.rb
Kazuhiko 3b548d9251 update grape to 0.3.1 for ruby 2.0 support.
add grape-entity, that is split from grape 0.3.0.
remove usage of deprecated error_format, that is removed in grape 0.2.3.
2013-02-26 21:31:45 +01:00

24 lines
477 B
Ruby

Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module Gitlab
class API < Grape::API
version 'v3', using: :path
rescue_from ActiveRecord::RecordNotFound do
rack_response({'message' => '404 Not found'}.to_json, 404)
end
format :json
helpers APIHelpers
mount Groups
mount Users
mount Projects
mount Issues
mount Milestones
mount Session
mount MergeRequests
mount Notes
mount Internal
end
end