ARI: Support channel variables in originate

This adds back in support for specifying channel variables during an
originate without compromising the ability to specify query parameters
in the JSON body. This was accomplished by generating the body-parsing
code in a separate function instead of being integrated with the URI
query parameter parsing code such that it could be called by paths with
body parameters. This is transparent to the user of the API and
prevents manual duplication of code or data structures.

(closes issue ASTERISK-23051)
Review: https://reviewboard.asterisk.org/r/3122/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-01-21 14:15:21 +00:00
parent 7affb5d332
commit bf97a4c8d7
23 changed files with 1161 additions and 474 deletions

View File

@@ -203,8 +203,10 @@ class AsteriskProcessor(SwaggerPostProcessor):
def process_parameter(self, parameter, context):
if parameter.param_type == 'body':
parameter.is_body_parameter = True;
parameter.c_data_type = 'struct ast_json *'
else:
parameter.is_body_parameter = False;
if not parameter.data_type in self.type_mapping:
raise SwaggerError(
"Invalid parameter type %s" % parameter.data_type, context)