summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-18 18:02:09 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-08-18 18:07:01 +0800
commitf999a783049f0f2f6d474d8e17aab3fdb5b03bde (patch)
treec055f39a81af9a9c8252907eede590d2b06fa041 /utils/test/testapi/opnfv_testapi
parent8151d9aacd51a5e8b9d68845fca6b15448210937 (diff)
in swagger operation parameter supports array type
it will be used in scenario update process later Change-Id: Ic44023169f1c0da0946e5e60339ce58076fc8807 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi')
-rw-r--r--utils/test/testapi/opnfv_testapi/tornado_swagger/swagger.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/utils/test/testapi/opnfv_testapi/tornado_swagger/swagger.py b/utils/test/testapi/opnfv_testapi/tornado_swagger/swagger.py
index 83f389a6b..6125c9554 100644
--- a/utils/test/testapi/opnfv_testapi/tornado_swagger/swagger.py
+++ b/utils/test/testapi/opnfv_testapi/tornado_swagger/swagger.py
@@ -94,11 +94,18 @@ class DocParser(object):
def _parse_type(self, **kwargs):
arg = kwargs.get('arg', None)
- body = self._get_body(**kwargs)
- self.params.setdefault(arg, {}).update({
- 'name': arg,
- 'dataType': body
- })
+ code = self._parse_epytext_para('code', **kwargs)
+ link = self._parse_epytext_para('link', **kwargs)
+ if code is None:
+ self.params.setdefault(arg, {}).update({
+ 'name': arg,
+ 'type': link
+ })
+ elif code == 'list':
+ self.params.setdefault(arg, {}).update({
+ 'type': 'array',
+ 'items': {'type': link}
+ })
def _parse_in(self, **kwargs):
arg = kwargs.get('arg', None)