api_platform:
    mapping:
        paths: ['%kernel.project_dir%/src/Entity']
    patch_formats:
        json: ['application/merge-patch+json']
    swagger:
        versions: [3]
    collection:
        pagination:
            # To enable or disable pagination for all resource collections by default.
            enabled: false
            # The default number of items per page.
            items_per_page: 10

    exception_to_status:
        # The 4 following handlers are registered by default, keep those lines to prevent unexpected side effects
        Symfony\Component\Serializer\Exception\ExceptionInterface: 400 # Use a raw status code (recommended)
        ApiPlatform\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
        ApiPlatform\Core\Exception\FilterValidationException: 400
        Doctrine\ORM\OptimisticLockException: 409
        # Custom mapping
        App\ApiPlatform\Exception\OperationNotAllowedException: 409
        App\ApiPlatform\Exception\UnprocessableEntity: 422