- 3 nouveaux endpoints API Platform pass-through sur /api/bovins/{inventory|returned-dossiers|presumed-exits} consommant BovinApiInterface v0.0.6
- AnimalSummaryMapper (src/Service/) factorisant le mapping DTO EDNOTIF -> ressource
- src/State/ réorganisé par domaine (Bovin/, Reception/, Shipment/, Building/, User/, System/)
- tag OpenAPI "Bovins" pour regrouper les endpoints ednotif dans Swagger
- malio/ednotif-bundle passé à v0.0.6
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\ApiResource;
|
|
|
|
use ApiPlatform\Metadata\ApiProperty;
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\Get;
|
|
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
|
use App\State\Bovin\BovinIdentificationProvider;
|
|
|
|
#[ApiResource(
|
|
operations: [
|
|
new Get(
|
|
uriTemplate: '/bovins/{numeroNational}/identification',
|
|
openapi: new OpenApiOperation(tags: ['Bovins']),
|
|
provider: BovinIdentificationProvider::class
|
|
),
|
|
]
|
|
)]
|
|
final class BovinIdentification
|
|
{
|
|
#[ApiProperty(identifier: true)]
|
|
public string $numeroNational;
|
|
|
|
public ?string $sex = null;
|
|
public ?string $breedType = null;
|
|
public ?string $workNumber = null;
|
|
|
|
public ?string $birthDate = null;
|
|
public ?string $birthDateCompletenessFlag = null;
|
|
|
|
public ?bool $isFilie = null;
|
|
|
|
public ?string $motherNationalNumber = null;
|
|
public ?string $motherBreedType = null;
|
|
|
|
public ?string $fatherNationalNumber = null;
|
|
public ?string $fatherBreedType = null;
|
|
|
|
public ?string $birthExploitationNumber = null;
|
|
|
|
/** @var list<PresencePeriod> */
|
|
public array $presencePeriods = [];
|
|
}
|