@@ 86-88 (lines=3) @@ | ||
83 | $output = []; |
|
84 | foreach($mappings as $key=>$map){ |
|
85 | $val = \JmesPath\search($map->source, $input); |
|
86 | if(substr($key, 0, strlen('response.')) == 'response.'){ |
|
87 | $key = substr($key, strlen('response.')); |
|
88 | } |
|
89 | ArrayHelper::set($output, $key, $val); |
|
90 | } |
|
91 | $renderer = $app->get(ResponseRenderer::class); |
@@ 197-199 (lines=3) @@ | ||
194 | $output = []; |
|
195 | $schema = new ResponseObject(); |
|
196 | foreach ($mappings as $key => $map) { |
|
197 | if (substr($key, 0, strlen('response.')) == 'response.') { |
|
198 | $key = substr($key, strlen('response.')); |
|
199 | } |
|
200 | ArrayHelper::set($output, $key, $map); |
|
201 | } |
|
202 | //TODO 支持 header、status 等 |