3
0

fix(codegen): merge parameters from api parent and call

This commit is contained in:
Tit Petric
2018-07-20 11:05:58 +02:00
parent 6a3e38bc2b
commit 44be095b3f
5 changed files with 39 additions and 11 deletions

View File

@@ -55,7 +55,12 @@ $apis = array_map(function($filename) {
if (empty($call['parameters'])) {
$call['parameters'] = array();
}
$call['parameters'] = array_merge($api['parameters'], $call['parameters']);
foreach ($api['parameters'] as $type => $params) {
if (empty($call['parameters'][$type])) {
$call['parameters'][$type] = array();
}
$call['parameters'][$type] = array_merge($call['parameters'][$type], $params);
}
$api['apis'][$kk] = $call;
}
return $api;