Bridge/Symfony/Serializer/Normalizer/TicketAttachmentNormalizer.php
public function normalize($attachment, $format = null, array $context = [])
    {
        if ($this->contextHasGroup(['Default', 'Ticket', 'TicketMessage', 'TicketAttachment'], $context)) {
            $data = $this->normalizeAttachment($attachment);

            $data['message'] = $attachment->getMessage()->getId();

            return $data;
        }

        return parent::normalize($attachment, $format, $context);
    }
public function normalize($attachment, $format = null, array $context = [])
    {
        if ($this->contextHasGroup(['Default', 'Ticket', 'TicketMessage', 'TicketAttachment'], $context)) {
            $data = $this->normalizeAttachment($attachment);

            $data['message'] = $attachment->getMessage()->getId();

            return $data;
        }

        return parent::normalize($attachment, $format, $context);
    }
@inheritDoc

@param TicketAttachmentInterface $attachment