protected function getTargetApiPath() : array
    {
        $result = [
            'fragment' => 'Controller/Api',
            'namespace' => 'App\Controller\Api',
        ];

        $versions = Utility::getApiVersions();

        if (empty($versions)) {
            return $result;
        }

        $recent = end($versions);

        if (preg_match('/^api(.*)$/', $recent['prefix'], $matches)) {
            $postfix = strtoupper($matches[1]);
            $result['fragment'] .= $postfix . '/';
            $result['namespace'] .= str_replace('/', '\\', $postfix);
        }

        return $result;
    }