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 flask import request
|
|||
from app import billing as stripe
|
||||
from endpoints.api import (resource, nickname, ApiResource, validate_json_request, request_error,
|
||||
related_user_resource, internal_only, Unauthorized, NotFound,
|
||||
require_user_admin, log_action, show_if)
|
||||
require_user_admin, log_action, show_if, path_param)
|
||||
from endpoints.api.team import team_view
|
||||
from endpoints.api.user import User, PrivateRepositories
|
||||
from auth.permissions import (AdministerOrganizationPermission, OrganizationMemberPermission,
|
||||
|
@ -97,6 +97,7 @@ class OrganizationList(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@internal_only
|
||||
@related_user_resource(User)
|
||||
class Organization(ApiResource):
|
||||
|
@ -163,6 +164,7 @@ class Organization(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/private')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@internal_only
|
||||
@related_user_resource(PrivateRepositories)
|
||||
@show_if(features.BILLING)
|
||||
|
@ -199,6 +201,7 @@ class OrgPrivateRepositories(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/members')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@internal_only
|
||||
class OrgnaizationMemberList(ApiResource):
|
||||
""" Resource for listing the members of an organization. """
|
||||
|
@ -232,6 +235,8 @@ class OrgnaizationMemberList(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/members/<membername>')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@path_param('membername', 'The username of the organization member')
|
||||
@internal_only
|
||||
class OrganizationMember(ApiResource):
|
||||
""" Resource for managing individual organization members. """
|
||||
|
@ -265,6 +270,7 @@ class OrganizationMember(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/app/<client_id>')
|
||||
@path_param('client_id', 'The OAuth client ID')
|
||||
class ApplicationInformation(ApiResource):
|
||||
""" Resource that returns public information about a registered application. """
|
||||
@nickname('getApplicationInformation')
|
||||
|
@ -302,6 +308,7 @@ def app_view(application):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/applications')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@internal_only
|
||||
class OrganizationApplications(ApiResource):
|
||||
""" Resource for managing applications defined by an organizations. """
|
||||
|
@ -386,6 +393,8 @@ class OrganizationApplications(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/applications/<client_id>')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@path_param('client_id', 'The OAuth client ID')
|
||||
@internal_only
|
||||
class OrganizationApplicationResource(ApiResource):
|
||||
""" Resource for managing an application defined by an organizations. """
|
||||
|
@ -498,6 +507,8 @@ class OrganizationApplicationResource(ApiResource):
|
|||
|
||||
|
||||
@resource('/v1/organization/<orgname>/applications/<client_id>/resetclientsecret')
|
||||
@path_param('orgname', 'The name of the organization')
|
||||
@path_param('client_id', 'The OAuth client ID')
|
||||
@internal_only
|
||||
class OrganizationApplicationResetClientSecret(ApiResource):
|
||||
""" Custom verb for resetting the client secret of an application. """
|
||||
|
|
Reference in a new issue