Add path param description support
This commit is contained in:
parent
d9accd0593
commit
e0bb94e439
3 changed files with 25 additions and 2 deletions
|
@ -153,6 +153,18 @@ related_user_resource = partial(add_method_metadata, 'related_user_resource')
|
|||
internal_only = add_method_metadata('internal', True)
|
||||
|
||||
|
||||
def path_param(name, description):
|
||||
def add_param(func):
|
||||
if '__api_path_params' not in dir(func):
|
||||
func.__api_path_params = {}
|
||||
func.__api_path_params[name] = {
|
||||
'name': name,
|
||||
'description': description
|
||||
}
|
||||
return func
|
||||
return add_param
|
||||
|
||||
|
||||
def query_param(name, help_str, type=reqparse.text_type, default=None,
|
||||
choices=(), required=False):
|
||||
def add_param(func):
|
||||
|
|
Reference in a new issue