Commit eaa99478a7612405bc93941ea69b93e7e776ca56
1 parent
8f01190e
Exists in
master
and in
4 other branches
Up API version to v3
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/views/layouts/_init_auto_complete.html.haml
1 | 1 | :javascript |
2 | 2 | $(function() { |
3 | - GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.id}/members" if @project }"; | |
3 | + GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }"; | |
4 | 4 | GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}"; |
5 | 5 | |
6 | 6 | GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source}; | ... | ... |
doc/api/README.md
... | ... | @@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version |
15 | 15 | Example of a valid API request: |
16 | 16 | |
17 | 17 | ``` |
18 | -GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U | |
18 | +GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U | |
19 | 19 | ``` |
20 | 20 | |
21 | 21 | The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL. | ... | ... |
lib/api.rb
... | ... | @@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file} |
2 | 2 | |
3 | 3 | module Gitlab |
4 | 4 | class API < Grape::API |
5 | - version 'v2', using: :path | |
5 | + version 'v3', using: :path | |
6 | 6 | |
7 | 7 | rescue_from ActiveRecord::RecordNotFound do |
8 | 8 | rack_response({'message' => '404 Not found'}.to_json, 404) | ... | ... |