Add documentation for all path parameters
This commit is contained in:
parent
02d3b70013
commit
53fb7f4136
19 changed files with 107 additions and 19 deletions
|
@ -5,7 +5,7 @@ from datetime import datetime, timedelta
|
|||
from endpoints.api import (resource, nickname, ApiResource, query_param, parse_args,
|
||||
RepositoryParamResource, require_repo_admin, related_user_resource,
|
||||
format_date, Unauthorized, NotFound, require_user_admin,
|
||||
internal_only)
|
||||
internal_only, path_param)
|
||||
from auth.permissions import AdministerOrganizationPermission, AdministerOrganizationPermission
|
||||
from auth.auth_context import get_authenticated_user
|
||||
from data import model
|
||||
|
@ -63,6 +63,7 @@ def get_logs(start_time, end_time, performer_name=None, repository=None, namespa
|
|||
|
||||
|
||||
@resource('/v1/repository/<repopath:repository>/logs')
|
||||
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
|
||||
@internal_only
|
||||
class RepositoryLogs(RepositoryParamResource):
|
||||
""" Resource for fetching logs for the specific repository. """
|
||||
|
@ -103,6 +104,7 @@ class UserLogs(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/logs')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@internal_only
|
||||
@related_user_resource(UserLogs)
|
||||
class OrgLogs(ApiResource):
|
||||
|
|
Reference in a new issue