[ERP-72] Paginer toutes les collections API + regle pagination obligatoire #28

Merged
tristan merged 8 commits from feature/ERP-72-backend-l-paginer-toutes-les-collections-api-exist into develop 2026-05-29 14:15:42 +00:00
Showing only changes of commit ec6dd1345c - Show all commits
@@ -29,18 +29,16 @@ use App\Module\Core\Infrastructure\ApiPlatform\State\Provider\AuditLogProvider;
* ?performed_at[after]=2026-04-01T00:00:00Z * ?performed_at[after]=2026-04-01T00:00:00Z
* ?performed_at[before]=2026-04-30T23:59:59Z * ?performed_at[before]=2026-04-30T23:59:59Z
* *
* La pagination est assuree par le provider via DbalPaginator (implementant * La pagination herite du standard global (10 items / page, max 50, cf.
* ApiPlatform\State\Pagination\PaginatorInterface), ce qui genere * `config/packages/api_platform.yaml`). Elle est materialisee par le
* automatiquement hydra:view — aucune construction manuelle. * DbalPaginator du provider qui implemente PaginatorInterface — API Platform
* genere automatiquement hydra:view sans construction manuelle.
*/ */
#[ApiResource( #[ApiResource(
shortName: 'AuditLog', shortName: 'AuditLog',
operations: [ operations: [
new GetCollection( new GetCollection(
uriTemplate: '/audit-logs', uriTemplate: '/audit-logs',
paginationItemsPerPage: 30,
paginationClientItemsPerPage: true,
paginationMaximumItemsPerPage: 50,
security: "is_granted('core.audit_log.view')", security: "is_granted('core.audit_log.view')",
provider: AuditLogProvider::class, provider: AuditLogProvider::class,
), ),