Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
cadef802
Commit
cadef802
authored
Jan 30, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remain V3 endpoint unchanged
parent
cc24682b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1895 additions
and
3 deletions
+1895
-3
lib/api/api.rb
lib/api/api.rb
+6
-1
lib/api/v3/projects.rb
lib/api/v3/projects.rb
+458
-0
spec/requests/api/v3/projects_spec.rb
spec/requests/api/v3/projects_spec.rb
+1424
-0
spec/support/api_helpers.rb
spec/support/api_helpers.rb
+7
-2
No files found.
lib/api/api.rb
View file @
cadef802
module
API
class
API
<
Grape
::
API
include
APIGuard
version
'v3'
,
using: :path
version
%w(v3 v4)
,
using: :path
version
'v3'
,
using: :path
do
mount
::
API
::
V3
::
Projects
end
before
{
allow_access_with_scope
:api
}
...
...
lib/api/v3/projects.rb
0 → 100644
View file @
cadef802
This diff is collapsed.
Click to expand it.
spec/requests/api/v3/projects_spec.rb
0 → 100644
View file @
cadef802
This diff is collapsed.
Click to expand it.
spec/support/api_helpers.rb
View file @
cadef802
...
...
@@ -17,8 +17,8 @@ module ApiHelpers
# => "/api/v2/issues?foo=bar&private_token=..."
#
# Returns the relative path to the requested API resource
def
api
(
path
,
user
=
nil
)
"/api/
#{
API
::
API
.
version
}#{
path
}
"
+
def
api
(
path
,
user
=
nil
,
version:
API
::
API
.
version
)
"/api/
#{
version
}#{
path
}
"
+
# Normalize query string
(
path
.
index
(
'?'
)
?
''
:
'?'
)
+
...
...
@@ -31,6 +31,11 @@ module ApiHelpers
end
end
# Temporary helper method for simplifying V3 exclusive API specs
def
v3_api
(
path
,
user
=
nil
)
api
(
path
,
user
,
version:
'v3'
)
end
def
ci_api
(
path
,
user
=
nil
)
"/ci/api/v1/
#{
path
}
"
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment