private function supportedMimeTypes(Route $route = null): SupportedMimeTypes
    {
        if ($this->disableContentNegotation) {
            return SupportedMimeTypes::createWithDisabledContentNegotation();
        }

        if (null !== $route) {
            return $route->supportedMimeTypes(
                    $this->mimeTypes,
                    $this->mimeTypeClasses
            );
        }

        return new SupportedMimeTypes($this->mimeTypes, $this->mimeTypeClasses);
    }