return new JsonResponse(null, Response::HTTP_NO_CONTENT
);
} #[Route(path: '/api/_action/version/{versionId}/{entity}/{entityId}', name: 'api.deleteVersion', methods: ['POST'], requirements: ['version' => '\d+', 'entity' => '[a-zA-Z-]+', 'id' => '[0-9a-f]{32}'])]
public function deleteVersion(Context
$context, string
$entity, string
$entityId, string
$versionId): JsonResponse
{ if (!Uuid::
isValid($versionId)) { throw ApiException::
invalidVersionId($versionId);
} if ($versionId === Defaults::LIVE_VERSION
) { throw ApiException::
deleteLiveVersion();
} if (!Uuid::
isValid($entityId)) { throw ApiException::
invalidVersionId($versionId);
} try { $entityDefinition =
$this->definitionRegistry->
getByEntityName($this->
urlToSnakeCase($entity));
} catch (DefinitionNotFoundException
$e) { throw ApiException::
definitionNotFound($e);
}