Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
3e81c7a3
Commit
3e81c7a3
authored
1 year ago
by
ml bonhomme
Committed by
Erwan Rouchet
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Document worker type filter
parent
b9fdf674
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2015
Document worker type filter
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arkindex/process/api.py
+7
-0
7 additions, 0 deletions
arkindex/process/api.py
arkindex/project/openapi/__init__.py
+9
-0
9 additions, 0 deletions
arkindex/project/openapi/__init__.py
with
16 additions
and
0 deletions
arkindex/process/api.py
+
7
−
0
View file @
3e81c7a3
...
...
@@ -102,6 +102,7 @@ from arkindex.project.mixins import (
SelectionMixin
,
WorkerACLMixin
,
)
from
arkindex.project.openapi
import
UUID_OR_STR
from
arkindex.project.pagination
import
CustomCursorPagination
from
arkindex.project.permissions
import
IsVerified
,
IsVerifiedOrReadOnly
from
arkindex.project.tools
import
PercentileCont
,
RTrimChr
...
...
@@ -802,6 +803,12 @@ class RevisionRetrieve(RepositoryACLMixin, RetrieveAPIView):
type
=
str
,
description
=
'
Filter workers by name.
'
,
required
=
False
,
),
OpenApiParameter
(
'
type
'
,
type
=
UUID_OR_STR
,
description
=
'
Filter workers by type, using either a type UUID or a type slug.
'
,
required
=
False
,
)
]
),
...
...
This diff is collapsed.
Click to expand it.
arkindex/project/openapi/__init__.py
+
9
−
0
View file @
3e81c7a3
...
...
@@ -14,3 +14,12 @@ UUID_OR_FALSE = {
{
'
type
'
:
'
boolean
'
,
'
enum
'
:
[
False
]},
]
}
# A JSON Schema that allows either an UUID or a string, to allow filtering by either an ID or a slug, for example
# when filtering by worker type.
UUID_OR_STR
=
{
'
oneOf
'
:
[
{
'
type
'
:
'
string
'
,
'
format
'
:
'
uuid
'
},
{
'
type
'
:
'
string
'
},
]
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment