[Tool][Generator] add missing optional, nullable checking at argument validating
authorpius.lee <pius.lee@samsung.com>
Mon, 19 Jan 2015 05:30:56 +0000 (14:30 +0900)
committerpius.lee <pius.lee@samsung.com>
Mon, 19 Jan 2015 05:30:56 +0000 (14:30 +0900)
Change-Id: I841deb66d200e8563eaaeab054052a509ee8a7e8
Signed-off-by: pius.lee <pius.lee@samsung.com>
tools/skeleton_generator/tpl/tpl_api.js

index 48b0dfbd052939b144e6d211f34b51de07f0f18b..e75425c16d1e1cf5eb2b9ece4a66344069995794 100644 (file)
@@ -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 %}
   ]);