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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ed9cb81a
Commit
ed9cb81a
authored
Oct 04, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update V4 API regarding new filtering fields
parent
a1fee790
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
lib/api/entities.rb
lib/api/entities.rb
+14
-1
spec/fixtures/api/schemas/board.json
spec/fixtures/api/schemas/board.json
+1
-1
spec/fixtures/api/schemas/public_api/v4/board.json
spec/fixtures/api/schemas/public_api/v4/board.json
+11
-0
spec/fixtures/api/schemas/public_api/v4/label/basic.json
spec/fixtures/api/schemas/public_api/v4/label/basic.json
+9
-0
spec/requests/api/boards_spec.rb
spec/requests/api/boards_spec.rb
+3
-1
No files found.
lib/api/entities.rb
View file @
ed9cb81a
...
...
@@ -797,8 +797,21 @@ module API
expose
:id
expose
:name
expose
:project
,
using:
Entities
::
BasicProjectDetails
# EE-specific
# Default filtering configuration
expose
:milestone
,
if:
->
(
board
,
_
)
{
board
.
project
.
feature_available?
(
:scoped_issue_board
)
}
using:
Entities
::
Milestone
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:assignee
,
using:
Entities
::
UserBasic
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:labels
,
using:
Entities
::
LabelBasic
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:weight
,
if:
->
(
board
,
_
)
{
board
.
parent
.
feature_available?
(
:scoped_issue_board
)
}
expose
:lists
,
using:
Entities
::
List
do
|
board
|
board
.
lists
.
destroyable
end
...
...
spec/fixtures/api/schemas/board.json
View file @
ed9cb81a
...
...
@@ -18,7 +18,7 @@
"title"
:
{
"type"
:
"string"
}
},
"additionalProperties"
:
false
}
}
,
},
"additionalProperties"
:
false
}
spec/fixtures/api/schemas/public_api/v4/board.json
View file @
ed9cb81a
...
...
@@ -3,13 +3,17 @@
"required"
:
[
"id"
,
"name"
,
"weight"
,
"project"
,
"milestone"
,
"assignee"
,
"labels"
,
"lists"
],
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"name"
:
{
"type"
:
"string"
},
"weight"
:
{
"type"
:
[
"string"
,
"null"
]
},
"project"
:
{
"type"
:
"object"
,
"required"
:
[
...
...
@@ -50,6 +54,13 @@
},
"additionalProperties"
:
false
},
"assignee"
:
{
"$ref"
:
"user/basic.json"
},
"labels"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"label/basic.json"
}
},
"milestone"
:
{
"type"
:
[
"object"
,
"null"
],
"required"
:
[
...
...
spec/fixtures/api/schemas/public_api/v4/label/basic.json
0 → 100644
View file @
ed9cb81a
{
"type"
:
"object"
,
"required"
:
[
"id"
,
"name"
,
"description"
],
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"name"
:
{
"type"
:
"string"
},
"description"
:
{
"type"
:
[
"string"
,
"null"
]
}
}
}
spec/requests/api/boards_spec.rb
View file @
ed9cb81a
...
...
@@ -29,9 +29,11 @@ describe API::Boards do
# EE only
set
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
set
(
:board_label
)
{
create
(
:label
,
project:
project
)
}
set
(
:board
)
do
create
(
:board
,
project:
project
,
milestone:
milestone
,
lists:
[
dev_list
,
test_list
])
create
(
:board
,
project:
project
,
milestone:
milestone
,
assignee:
user
,
label_ids:
[
board_label
.
id
],
lists:
[
dev_list
,
test_list
])
end
before
do
...
...
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