ApiPlatform\Core\Hydra\Serializer\DocumentationNormalizer::computeDoc PHP Method

computeDoc() private method

Computes the documentation.
private computeDoc ( Documentation $object, array $classes ) : array
$object ApiPlatform\Core\Documentation\Documentation
$classes array
return array
    private function computeDoc(Documentation $object, array $classes) : array
    {
        $doc = ['@context' => $this->getContext(), '@id' => $this->urlGenerator->generate('api_doc', ['_format' => self::FORMAT])];
        if ('' !== $object->getTitle()) {
            $doc['hydra:title'] = $object->getTitle();
        }
        if ('' !== $object->getDescription()) {
            $doc['hydra:description'] = $object->getDescription();
        }
        $doc['hydra:entrypoint'] = $this->urlGenerator->generate('api_entrypoint');
        $doc['hydra:supportedClass'] = $classes;
        return $doc;
    }