projects
/
platform
/
core
/
api
/
webapi-plugins.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8af401a
)
[Tool][Generator] add missing optional, nullable checking at argument validating
author
pius.lee
<pius.lee@samsung.com>
Mon, 19 Jan 2015 05:30:56 +0000
(14:30 +0900)
committer
pius.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
patch
|
blob
|
history
diff --git
a/tools/skeleton_generator/tpl/tpl_api.js
b/tools/skeleton_generator/tpl/tpl_api.js
index 48b0dfbd052939b144e6d211f34b51de07f0f18b..e75425c16d1e1cf5eb2b9ece4a66344069995794 100644
(file)
--- 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 %}
]);