Fix wrong reference to status argument in the docs

Fix the documentation where it sais that wsme.signature takes a status
argument: the actual name of the argument is status_code.

Closes-Bug: #1455563
Change-Id: Ifa3abef5654e5b796285a467fe5e6bce248ef60c
This commit is contained in:
Stéphane Bisinger 2015-05-15 18:16:36 +02:00 committed by Lucas Alvares Gomes
parent f28ec1354e
commit a88c83001f
2 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@ Public API
.. module:: wsme
.. autoclass:: signature([return_type, [arg0_type, [arg1_type, ... ] ] ], body=None, status=None)
.. autoclass:: signature([return_type, [arg0_type, [arg1_type, ... ] ] ], body=None, status_code=None)
.. autoclass:: wsme.types.Base
.. autoclass:: wsattr

View File

@ -141,14 +141,14 @@ class FunctionDefinition(object):
class signature(object):
"""
Decorator that specify the argument types of an exposed function.
"""Decorator that specify the argument types of an exposed function.
:param return_type: Type of the value returned by the function
:param argN: Type of the Nth argument
:param body: If the function takes a final argument that is supposed to be
the request body by itself, its type.
:param status: HTTP return status code of the function.
:param status_code: HTTP return status code of the function.
:param ignore_extra_args: Allow extra/unknow arguments (default to False)
Most of the time this decorator is not supposed to be used directly,
@ -158,6 +158,7 @@ class signature(object):
decororator, either a new decorator named @wsexpose that takes the same
parameters (it will in addition expose the function, hence its name).
"""
def __init__(self, *types, **options):
self.return_type = types[0] if types else None
self.arg_types = []