Api 生成文档时平台重命名 class?

Api Platform renaming class when generating Documentation?

当我尝试访问 Api Platform/Symfony 的默认 /api 时,我正在处理的项目出现问题。 加载文档页面并且已经生成缓存时发生错误。 我检查了我没有在任何地方将其加载为 'survey' 的项目,生成缓存后错误很明显。 例如:我清理缓存 => 1st /api 加载顺利,/api 的任何进一步加载都会触发错误。

我收到这个错误: Class App\Entity\survey 不存在 https://i.stack.imgur.com/83pK7.png

这是该实体的声明:

namespace App\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\SurveyRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Serializer\Annotation\Groups;
 /**
 * @ORM\Entity(repositoryClass=SurveyRepository::class)
 * @ApiResource(
 *     normalizationContext={
 *         "groups"={"survey_read"}
 *     },
 *     denormalizationContext={
 *          "groups"={"survey_write"}
 *     },
 *     collectionOperations={
 *          "get"={
 *              "security"="is_granted('ROLE_ADMIN')"
 *          },
 *          "post"={
 *              "security"="is_granted('ROLE_ADMIN')"
 *          }
 *     },
 *     itemOperations={
 *          "get"={
 *              "security"="is_granted('ROLE_USER')"
 *          },
 *          "delete"={
 *              "security"="is_granted('ROLE_ADMIN')"
 *          },
 *          "patch"={
 *              "security"="is_granted('ROLE_ADMIN')"
 *          }
 *     }
 * )
 * @ORM\HasLifecycleCallbacks
 */
class Survey

这是非常基本的配置,所以我不知道发生了什么。 如果有人有类似的修复错误?或一些 url 我可以找到答案的地方。 谢谢!!

我在与这个关联的另一个实体中拼错了。

我现在的问题是第一次没有触发错误?