Add documentation for all path parameters

This commit is contained in:
Joseph Schorr 2014-08-19 19:05:28 -04:00
parent 02d3b70013
commit 53fb7f4136
19 changed files with 107 additions and 19 deletions

View file

@ -3,7 +3,7 @@ import logging
from flask import request
from endpoints.api import (resource, nickname, require_repo_admin, RepositoryParamResource,
log_action, request_error, validate_json_request)
log_action, request_error, validate_json_request, path_param)
from data import model
@ -26,6 +26,7 @@ def wrap_role_view_org(role_json, user, org_members):
@resource('/v1/repository/<repopath:repository>/permissions/team/')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class RepositoryTeamPermissionList(RepositoryParamResource):
""" Resource for repository team permissions. """
@require_repo_admin
@ -41,6 +42,7 @@ class RepositoryTeamPermissionList(RepositoryParamResource):
@resource('/v1/repository/<repopath:repository>/permissions/user/')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
class RepositoryUserPermissionList(RepositoryParamResource):
""" Resource for repository user permissions. """
@require_repo_admin
@ -80,6 +82,8 @@ class RepositoryUserPermissionList(RepositoryParamResource):
@resource('/v1/repository/<repopath:repository>/permissions/user/<username>')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('username', 'The username of the user to which the permission applies')
class RepositoryUserPermission(RepositoryParamResource):
""" Resource for managing individual user permissions. """
schemas = {
@ -175,6 +179,8 @@ class RepositoryUserPermission(RepositoryParamResource):
@resource('/v1/repository/<repopath:repository>/permissions/team/<teamname>')
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
@path_param('teamname', 'The name of the team to which the permission applies')
class RepositoryTeamPermission(RepositoryParamResource):
""" Resource for managing individual team permissions. """
schemas = {