api_platform:
    title: Hello API Platform
    version: 1.0.0
    mapping:
        paths: ['%kernel.project_dir%/src/Entity']
    patch_formats:
        json: ['application/merge-patch+json']
    formats:
        json: [ 'application/json' ]
        jsonld: [ 'application/ld+json' ]
    swagger:
        versions: [3]
        api_keys:
            apiKey:
                name: Authorization
                type: header
    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\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
        ApiPlatform\Exception\FilterValidationException: 400
        Doctrine\ORM\OptimisticLockException: 409

        # Validation exception
        ApiPlatform\Validator\Exception\ValidationException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY

        # Custom mapping
        App\Exception\BookLookupFailedException: 404
    # Mercure integration, remove if unwanted
#    mercure: ~
    # Good cache defaults for REST APIs
    defaults:
        stateless: true
        cache_headers:
            vary: ['Content-Type', 'Authorization', 'Origin']
        extraProperties: 
            standard_put: false
            
        # pagination
        pagination_client_items_per_page: true
        collection:
            pagination:
                items_per_page_parameter_name: itemsPerPage # Default value
