connexion.decorators.parameter

Module Contents

Functions

inspect_function_arguments(function)

Returns the list of variables names of a function and if it

snake_and_shadow(name)

Converts the given name into Pythonic form. Firstly it converts CamelCase names to snake_case. Secondly it looks to

parameter_to_arg(operation, function, pythonic_params=False, pass_context_arg_name=None)

Pass query and body parameters as keyword arguments to handler function.

Attributes

logger

connexion.decorators.parameter.logger
connexion.decorators.parameter.inspect_function_arguments(function)

Returns the list of variables names of a function and if it accepts keyword arguments.

Return type

tuple[list[str], bool]

connexion.decorators.parameter.snake_and_shadow(name)

Converts the given name into Pythonic form. Firstly it converts CamelCase names to snake_case. Secondly it looks to see if the name matches a known built-in and if it does it appends an underscore to the name. :param name: The parameter name :type name: str :return:

connexion.decorators.parameter.parameter_to_arg(operation, function, pythonic_params=False, pass_context_arg_name=None)

Pass query and body parameters as keyword arguments to handler function.

See (https://github.com/zalando/connexion/issues/59) :param operation: The operation being called :type operation: connexion.operations.AbstractOperation :param pythonic_params: When True CamelCase parameters are converted to snake_case and an underscore is appended to any shadowed built-ins :type pythonic_params: bool :param pass_context_arg_name: If not None URL and function has an argument matching this name, the framework’s request context will be passed as that argument. :type pass_context_arg_name: str|None