getId()) { throw new ValidatorException('Data Id is required'); } $content = $this->createRequest($httpClient, 'DELETE', 'http://'.$this->ogDhcpApiUrl.'/ogdhcp/v1/subnets/'.$data->getServerId()); $this->entityManager->remove($data); $this->entityManager->flush(); return new JsonResponse(data: $content, status: Response::HTTP_OK); } }