protected function getEndpoints()
    {
        if (!$this->endpointsCache) {
            $isHidden = $this->getControllerMethod('isMethodHidden');
            $endpoints = [];
            $parts = [];
            $methods = $this->reflectedController->getMethods(\ReflectionMethod::IS_PUBLIC);
            foreach ($methods as $method) {
                if (preg_match('/([a-z]+)([A-Z]\w+)Endpoint$/', $method->getName(), $parts)) {
                    if (!$isHidden($method->getName())) {
                        $httpVerb = strtolower($parts[1]);
                        $endpoint = $this->camelcaseToHyphenated($parts[2]);
                        if (!array_key_exists($httpVerb, $endpoints)) {
                            $endpoints[$httpVerb] = array();
                        }
                        $endpoints[$httpVerb][$endpoint] = $this->documentation->getMethodDocumentation($method);
                    }
                }
            }
            $this->endpointsCache = $endpoints;
        }
        return $this->endpointsCache;
    }