feat(catalog) : expose CategoryType as read-only ApiResource with default label ASC sort

This commit is contained in:
Matthieu
2026-05-28 09:30:08 +02:00
parent 9569251900
commit 7a12b18a52
@@ -29,6 +29,9 @@ use Symfony\Component\Serializer\Attribute\Groups;
new GetCollection( new GetCollection(
security: "is_granted('catalog.categories.view')", security: "is_granted('catalog.categories.view')",
normalizationContext: ['groups' => ['category_type:read']], normalizationContext: ['groups' => ['category_type:read']],
// Tri par defaut requis par la spec M0 § 4.6 : ordre alphabetique
// stable pour alimenter le <MalioSelect> du formulaire Category.
order: ['label' => 'ASC'],
), ),
new Get( new Get(
security: "is_granted('catalog.categories.view')", security: "is_granted('catalog.categories.view')",