api_platform:
    mapping:
        paths: ['%kernel.project_dir%/src/Entity']
    # eager_loading:
    #     force_eager: false
    title: '%api.title%'
    # enable_nelmio_api_doc: false
    # enable_swagger: false
    enable_swagger_ui: false
    enable_docs: false
    formats:
        jsonld:
            mime_types: ['application/ld+json']
        json:
            mime_types: ['application/json']
        # html:
        #     mime_types: ['text/html']
    collection:
        pagination:
            enabled: true
            client_items_per_page: true # Disabled by default
            items_per_page_parameter_name: itemsPerPage # Default value
            page_parameter_name: page
            client_enabled: true
            enabled_parameter_name: pagination # optional
            maximum_items_per_page: 30
            # pagination_client_enabled: true
            # pagination_items_per_page: 10
    # eager_loading:
    #     max_joins: 500
    http_cache:
        invalidation:
            enabled: false
            # varnish_urls: ['%env(VARNISH_URL)%']
        max_age: 0
        shared_max_age: 3600
        vary: ['Content-Type', 'Authorization', 'Origin']
        public: true
    # swagger:
    #      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\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
        ApiPlatform\Core\Exception\FilterValidationException: 400
        Doctrine\ORM\OptimisticLockException: 409

        # Custom mapping
        App\Exception\NotFoundException: 404 # Here is the handler for our custom exception