Add documentation for all path parameters
This commit is contained in:
parent
02d3b70013
commit
53fb7f4136
19 changed files with 107 additions and 19 deletions
|
@ -3,7 +3,7 @@ import logging
|
|||
from flask import request
|
||||
|
||||
from endpoints.api import (resource, nickname, require_repo_admin, RepositoryParamResource,
|
||||
log_action, validate_json_request, NotFound)
|
||||
log_action, validate_json_request, NotFound, path_param)
|
||||
from data import model
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@ def token_view(token_obj):
|
|||
|
||||
|
||||
@resource('/v1/repository/<repopath:repository>/tokens/')
|
||||
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
|
||||
class RepositoryTokenList(RepositoryParamResource):
|
||||
""" Resource for creating and listing repository tokens. """
|
||||
schemas = {
|
||||
|
@ -66,6 +67,8 @@ class RepositoryTokenList(RepositoryParamResource):
|
|||
|
||||
|
||||
@resource('/v1/repository/<repopath:repository>/tokens/<code>')
|
||||
@path_param('repository', 'The full path of the repository. e.g. namespace/name')
|
||||
@path_param('code', 'The token code')
|
||||
class RepositoryToken(RepositoryParamResource):
|
||||
""" Resource for managing individual tokens. """
|
||||
schemas = {
|
||||
|
|
Reference in a new issue