private function resolveApiDescription()
    {
        $resolveByClassNameAttempted = false;
        while (!$this->apiDescription instanceof AbstractApiDescription) {
            if ($resolveByClassNameAttempted) {
                $error = (is_null($this->apiDescription))
                    ? 'No API service description found'
                    : 'Malformed API service description';

                throw new InvalidDescriptionException($error);
            }

            $resolveByClassNameAttempted = true;
            if (class_exists($this->apiDescription)
                && is_subclass_of($this->apiDescription, AbstractApiDescription::class)
            ) {
                $this->apiDescription = new $this->apiDescription([]);
            }
        }

        return $this->apiDescription = $this->apiDescription->load();
    }