Commit 0d2a0f47 authored by janis.streib's avatar janis.streib 🦉
Browse files

FIX: array type representation in properties

parent d7227a61
Pipeline #77325 passed with stages
in 5 minutes and 59 seconds
......@@ -167,6 +167,20 @@ def setDef(tmp):
return res
def gen_param_defs(d, scope):
defs = {
'type': d['dataType']['json_name'],
'description': d['description'],
'required': d[scope]['isRequired'],
'nullable': d[scope]['isNullable'],
'has_def': 'dataDefault' in d[scope],
'default': d[scope].get('dataDefault', None)
}
if d['dataType']['json_name'] == 'array':
defs['items'] = {'type': 'string'}
return defs
def generateParamters(f):
if not f['is_data_manipulating']:
tmp = [
......@@ -184,25 +198,12 @@ def generateParamters(f):
for p, d in f['parameters'].items()]
return setDef(tmp)
new_params = {
p: {
'type': d['dataType']['json_name'],
'description': d['description'],
'required': d['new']['isRequired'],
'nullable': d['new']['isNullable'],
'has_def': 'dataDefault' in d['new'],
'default': d['new'].get('dataDefault', None)
}
for p, d in f['parameters'].items() if 'new' in d
p: gen_param_defs(d, 'new')
for p, d in f['parameters'].items() if 'new' in d
}
old_params = {
p: {
'type': d['dataType']['json_name'],
'description': d['description'],
'required': d['old']['isRequired'],
'nullable': d['old']['isNullable'],
'has_def': 'dataDefault' in d['old'],
'default': d['old'].get('dataDefault', None)
}
p: gen_param_defs(d, 'old')
for p, d in f['parameters'].items() if 'old' in d
}
old_params = {k: setDef([v])[0] for k, v in old_params.items()}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment