@@ 71-73 (lines=3) @@ | ||
68 | $output = []; |
|
69 | foreach($mappings as $key=>$map){ |
|
70 | $val = \JmesPath\search($map->source, $input); |
|
71 | if(substr($key, 0, strlen('response.')) == 'response.'){ |
|
72 | $key = substr($key, strlen('response.')); |
|
73 | } |
|
74 | ArrayHelper::set($output, $key, $val); |
|
75 | } |
|
76 | $renderer = $app->get(ResponseRenderer::class); |
@@ 187-189 (lines=3) @@ | ||
184 | $output = []; |
|
185 | $schema = new ResponseObject(); |
|
186 | foreach ($mappings as $key => $map) { |
|
187 | if (substr($key, 0, strlen('response.')) == 'response.') { |
|
188 | $key = substr($key, strlen('response.')); |
|
189 | } |
|
190 | ArrayHelper::set($output, $key, $map); |
|
191 | } |
|
192 | //TODO 支持 header、status 等 |