<?php

declare(strict_types=1);

namespace App\ApiResource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\State\AppVersionProvider;
use Symfony\Component\Serializer\Attribute\Groups;

#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/version',
            normalizationContext: ['groups' => ['version:read']],
            provider: AppVersionProvider::class,
        ),
    ],
)]
final class AppVersion
{
    #[Groups(['version:read'])]
    public string $version = '';
}
