protected function getRouteApiParts($route)
    {
        $name = explode('/', $route->getPattern());

        $parts = array(
            'exposed' => false
        );

        // if the name has more than one string pattern
        if (count($name) > 2){
            // get the method name
            $method = array_pop($name);

            // upcase the namespace names
            array_walk($name, function(&$n){
                $n = ucfirst($n);
            });

            $path = implode('', $name);

            $parts = array(
                'path' => $path,
                'exposed' => true,
                'name' => $method,
                'len' => 1
            );

            if ($route->isFormDirect()){
                $parts['formHandler'] = true;
            }

        }

        return $parts;
    }