25 lines
490 B
PHP
25 lines
490 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Shared\Infrastructure\ApiPlatform\Resource;
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Get;
|
|
use App\Shared\Infrastructure\ApiPlatform\State\AppVersionProvider;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new Get(
|
|
uriTemplate: '/version',
|
|
provider: AppVersionProvider::class,
|
|
),
|
|
],
|
|
)]
|
|
class AppVersion
|
|
{
|
|
public function __construct(
|
|
public readonly string $version,
|
|
) {}
|
|
}
|