summaryrefslogtreecommitdiff
path: root/rest-api-templates/asterisk_processor.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest-api-templates/asterisk_processor.py')
-rw-r--r--rest-api-templates/asterisk_processor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/rest-api-templates/asterisk_processor.py b/rest-api-templates/asterisk_processor.py
index 0260b6b55..6f69b4865 100644
--- a/rest-api-templates/asterisk_processor.py
+++ b/rest-api-templates/asterisk_processor.py
@@ -139,10 +139,11 @@ class AsteriskProcessor(SwaggerPostProcessor):
#: String conversion functions for string to C type.
convert_mapping = {
- 'const char *': '',
+ 'string': '',
'int': 'atoi',
'long': 'atol',
'double': 'atof',
+ 'boolean': 'ast_true',
}
def __init__(self, wiki_prefix):
@@ -194,7 +195,7 @@ class AsteriskProcessor(SwaggerPostProcessor):
# Parameter names are camelcase, Asterisk convention is snake case
parameter.c_name = snakify(parameter.name)
parameter.c_data_type = self.type_mapping[parameter.data_type]
- parameter.c_convert = self.convert_mapping[parameter.c_data_type]
+ parameter.c_convert = self.convert_mapping[parameter.data_type]
# You shouldn't put a space between 'char *' and the variable
if parameter.c_data_type.endswith('*'):
parameter.c_space = ''