Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-web
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jérémy Bobbio (Lunar)
swh-web
Commits
4e146145
Verified
Commit
4e146145
authored
7 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
apidoc: Add @param information on routes using it
Closes T632
parent
f4219baf
No related branches found
Branches containing commit
Tags
v0.0.57
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/web/ui/views/api.py
+11
-6
11 additions, 6 deletions
swh/web/ui/views/api.py
with
11 additions
and
6 deletions
swh/web/ui/views/api.py
+
11
−
6
View file @
4e146145
...
...
@@ -103,10 +103,11 @@ def api_origin_visit(origin_id, visit_id):
doc
=
"""
Optional
'
Link
'
header proposed to the api consumer
for navigation purpose. possible are
'
next
'
or
'
previous
'
page.
"""
)
@doc.param
(
'
last_sha1
'
,
default
=
None
,
doc
=
"""
Optional parameter to start returning page results from.
"""
)
@doc.param
(
'
per_page
'
,
default
=
10
,
doc
=
"""
Optional parameter which permits
to limit the number of data to retrieve on a per request
basis.
doc
=
"""
Optional parameter to limit the number of data per page
to retrieve on a per request basis.
The default is 10, up to 50 max.
"""
)
@doc.returns
(
rettype
=
doc
.
rettypes
.
list
,
retdoc
=
"""
A list of dict whose content matches the expression.
...
...
@@ -117,9 +118,9 @@ def api_origin_visit(origin_id, visit_id):
- lang (text): Language for that entry
- line (int): Number line for the symbol
The result is paginated by page of 10 results
. The
'
Link
'
header gives the
relation
to follow for the next
and eventually the previous
page.
The result is paginated by page of 10 results
by default.
The
'
Link
'
header gives the
link
to follow for the next
page.
"""
)
def
api_content_symbol
(
q
=
None
):
...
...
@@ -174,6 +175,10 @@ def api_content_symbol(q=None):
argtype
=
doc
.
argtypes
.
algo_and_hash
,
argdoc
=
"""
An algo_hash:hash string, where algo_hash is one of sha1,
sha1_git or sha256 and hash is the hash to search for in SWH
"""
)
@doc.param
(
'
q
'
,
default
=
None
,
doc
=
"""
(POST request) An algo_hash:hash string, where algo_hash
is one of sha1, sha1_git or sha256 and hash is the hash to
search for in SWH
"""
)
@doc.raises
(
exc
=
doc
.
excs
.
badinput
,
doc
=
'
Raised if q is not well formed
'
)
@doc.returns
(
rettype
=
doc
.
rettypes
.
dict
,
...
...
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