I would like you to translate this php symfony code into a kotlin spring boot 3.2 code, you should use annotation from SpringDoc to replace the ones from OpenApi php library: 

here is the controller: 

<?php

declare(strict_types=1);

namespace App\Presentation\Rest\Action\Parcel;

use App\Domain\Application\Query\Tracking\GetTrackingByParcelIdQuery;
use App\Domain\Application\Query\Tracking\GetTrackingByParcelIdQueryHandler;
use App\Domain\Model\Exception\DomainExceptionInterface;
use App\Domain\Model\Exception\InfraExceptionInterface;
use App\Domain\Model\Tracking\Exception\TrackingNotFoundException;
use App\Presentation\Rest\Action\Tracking\DTO\TrackingDTO;
use App\Presentation\Rest\DTO\Error\ErrorResponseDTO;
use App\Presentation\Rest\Exception\RestException;
use OpenApi\Attributes as OA;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Exception\ExceptionInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

final class GetParcelTrackingAction
{
    public function __construct(
        private readonly NormalizerInterface $normalizer,
        private readonly GetTrackingByParcelIdQueryHandler $queryHandler
    ) {
    }

    #[OA\Get(
        path: '/api/v1/parcels/{id}/tracking',
        operationId: 'GetParcelTrackingAction/v1',
        summary: 'Get the Tracking of a parcel',
        tags: ['Trackings'],
    )]
    #[OA\Response(
        response: 200,
        description: 'The Tracking associated to the requested parcel',
        content: new OA\JsonContent(
            properties: [
                new OA\Property(property: 'content', ref: '#/components/schemas/TrackingDTO', type: 'object'),
            ],
        )
    )]
    #[OA\Response(response: 400, description: 'Bad request, adjust before retrying')]
    #[OA\Response(
        response: 404,
        description: 'Resource not found',
        content: new OA\JsonContent(
            examples: [
                'TRACKING_NOT_FOUND' => new OA\Examples(example: 'TRACKING_NOT_FOUND', summary: 'The tracking can not be found'),
            ]
        )
    )]
    #[OA\Response(response: 500, description: 'Internal server error')]
    /**
     * @throws RestException|ExceptionInterface
     */
    public function __invoke(
        #[OA\Parameter(description: 'The Parcel ID', in: 'path', required: true, schema: new OA\Schema(type: 'string', example: 'S191213872069 or 646e1637f324be31006c70e7'))]
        string $id,
        Request $httpRequest
    ): JsonResponse {
        try {
            $tracking = $this->queryHandler->__invoke(new GetTrackingByParcelIdQuery($id));
        } catch (TrackingNotFoundException $e) {
            // We don't want to generate logs on this case
            // throw RestException::fromDomainException($e, Response::HTTP_NOT_FOUND);
            return new JsonResponse(
                ErrorResponseDTO::notFound($e->getErrorCode(), $e->getMessage())->toArray(),
                Response::HTTP_NOT_FOUND
            );
        } catch (DomainExceptionInterface $e) {
            throw RestException::fromDomainException($e, Response::HTTP_BAD_REQUEST);
        } catch (InfraExceptionInterface $e) {
            throw RestException::fromInfraException($e);
        }

        return new JsonResponse(
            $this->normalizer->normalize(
                TrackingDTO::fromTracking($tracking),
                JsonEncoder::FORMAT
            )
        );
    }
}

the DTO: 
#[OA\Schema]
class TrackingDTO
{
    public ?string $carrierTrackingUrl = null;

    public function __construct(
        #[OA\Property(example: '123456')]
        public int $id,
        #[OA\Property(description: 'Reference provided by client during tracking creation for correlation purpose', example: 'abc2dce4-d810-4f25-bbe0-68b4c14faa32')]
        public string $parcelId,
        #[OA\Property(description: 'Reference provided by client during tracking creation for grouping purpose', example: '500000001')]
        public string $orderId,
        #[OA\Property(example: '9A123456789')]
        public ?string $carrierTrackingNumber
    ) {
    }

    public static function fromTracking(Tracking $tracking): self
    {
        $self = new self(
            (int) $tracking->getId(),
            $tracking->getParcelId(),
            $tracking->getOrderId(),
            null === $tracking->getTrackingNumber() ? null : (string) $tracking->getTrackingNumber()
        );
        $self->carrierTrackingUrl = $tracking->getTrackingUrl();

        return $self;
    }
}

the service handler:

class GetTrackingByParcelIdQueryHandler
{
    public function __construct(private readonly TrackingRepository $trackingRepository)
    {
    }

    /**
     * @throws TrackingNotFoundException
     * @throws InfraExceptionInterface
     */
    public function __invoke(GetTrackingByParcelIdQuery $query): Tracking
    {
        $tracking = $this->trackingRepository->findByParcelId($query->parcelId);
        if (null === $tracking) {
            throw TrackingNotFoundException::forParcelId($query->parcelId);
        }

        return $tracking;
    }
}