normalize($documentation); // Remove base path if (isset($documentation['basePath'])) { $paths = []; foreach ($documentation['paths'] as $path => $value) { $paths['/'.ltrim($documentation['basePath'].'/'.ltrim($path, '/'), '/')] = $value; } unset($documentation['basePath']); $documentation['paths'] = $paths; } return $documentation; }, $overwrite); } }