From: pius.lee Date: Mon, 19 Jan 2015 05:30:56 +0000 (+0900) Subject: [Tool][Generator] add missing optional, nullable checking at argument validating X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~605 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1954e648c505ec3b122e8ce23939590e10842a3a;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Tool][Generator] add missing optional, nullable checking at argument validating Change-Id: I841deb66d200e8563eaaeab054052a509ee8a7e8 Signed-off-by: pius.lee --- diff --git a/tools/skeleton_generator/tpl/tpl_api.js b/tools/skeleton_generator/tpl/tpl_api.js index 48b0dfbd..e75425c1 100644 --- a/tools/skeleton_generator/tpl/tpl_api.js +++ b/tools/skeleton_generator/tpl/tpl_api.js @@ -129,8 +129,10 @@ function {{iface.name}}( {'name': '{{arg.name}}', 'type': types_.{{arg.validation[0]}} {%- if arg.validation[1] -%} , 'values': {{arg.validation[1]}} - {%- endif -%} } - {%- if not loop.last %},{% endif %} + {%- endif -%} + {%- if arg.optional -%}, 'optional': true{% endif -%} + {%- if arg.xtype.nullable -%}, 'nullable': true{% endif -%} + }{%- if not loop.last %},{% endif %} {% endfor %} ]);