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

@ -1,7 +1,8 @@
from flask import request
from endpoints.api import (resource, nickname, ApiResource, validate_json_request, request_error,
log_action, Unauthorized, NotFound, internal_only, require_scope)
log_action, Unauthorized, NotFound, internal_only, require_scope,
path_param)
from auth.permissions import AdministerOrganizationPermission, ViewTeamPermission
from auth.auth_context import get_authenticated_user
from auth import scopes
@ -28,6 +29,8 @@ def member_view(member):
@resource('/v1/organization/<orgname>/team/<teamname>')
@path_param('orgname', 'The name of the organization')
@path_param('teamname', 'The name of the team')
@internal_only
class OrganizationTeam(ApiResource):
""" Resource for manging an organization's teams. """
@ -111,6 +114,8 @@ class OrganizationTeam(ApiResource):
@resource('/v1/organization/<orgname>/team/<teamname>/members')
@path_param('orgname', 'The name of the organization')
@path_param('teamname', 'The name of the team')
@internal_only
class TeamMemberList(ApiResource):
""" Resource for managing the list of members for a team. """
@ -137,6 +142,9 @@ class TeamMemberList(ApiResource):
@resource('/v1/organization/<orgname>/team/<teamname>/members/<membername>')
@path_param('orgname', 'The name of the organization')
@path_param('teamname', 'The name of the team')
@path_param('membername', 'The username of the team member')
class TeamMember(ApiResource):
""" Resource for managing individual members of a team. """
@require_scope(scopes.ORG_ADMIN)