summaryrefslogtreecommitdiff
path: root/lib/api/api.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-02 16:37:40 +0100
committerPhil Hughes <me@iamphill.com>2017-08-02 16:37:40 +0100
commite4c20cd3fe330faa415493ee2fe30dc16fbaca80 (patch)
tree0be61b6cc59cf35d81b9271c7603e0d8b203a31c /lib/api/api.rb
parent25d6a6c4b528159c288995de4909e6a8da431d0b (diff)
parent88958e5a9cd364ae36f3d2837982cedb9239c3bc (diff)
downloadgitlab-ce-e4c20cd3fe330faa415493ee2fe30dc16fbaca80.tar.gz
Merge branch 'master' into sidebar-fly-out-sub-navsidebar-fly-out-sub-nav
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index efcf0976a81..e08f4e2995f 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -3,6 +3,7 @@ module API
include APIGuard
allow_access_with_scope :api
+ prefix :api
version %w(v3 v4), using: :path
@@ -85,6 +86,9 @@ module API
helpers ::API::Helpers
helpers ::API::Helpers::CommonHelpers
+ NO_SLASH_URL_PART_REGEX = %r{[^/]+}
+ PROJECT_ENDPOINT_REQUIREMENTS = { id: NO_SLASH_URL_PART_REGEX }.freeze
+
# Keep in alphabetical order
mount ::API::AccessRequests
mount ::API::AwardEmoji
@@ -109,7 +113,8 @@ module API
mount ::API::Members
mount ::API::MergeRequestDiffs
mount ::API::MergeRequests
- mount ::API::Milestones
+ mount ::API::ProjectMilestones
+ mount ::API::GroupMilestones
mount ::API::Namespaces
mount ::API::Notes
mount ::API::NotificationSettings
@@ -118,6 +123,7 @@ module API
mount ::API::ProjectHooks
mount ::API::Projects
mount ::API::ProjectSnippets
+ mount ::API::ProtectedBranches
mount ::API::Repositories
mount ::API::Runner
mount ::API::Runners
@@ -134,6 +140,7 @@ module API
mount ::API::Triggers
mount ::API::Users
mount ::API::Variables
+ mount ::API::GroupVariables
mount ::API::Version
route :any, '*path' do