gitlab-org--gitlab-foss/lib/api.rb
Nihad Abbasov 968c09ae91 API version returns last version set
* fixed in grape v0.2.2
2012-12-01 02:03:51 -08:00

23 lines
460 B
Ruby

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