Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/config/packages/api_platform.yaml

60 lines
2.1 KiB

api_platform:
title: 'Chamilo Api'
version: '1.0.0'
mapping:
paths: ['%kernel.project_dir%/src/CoreBundle/Entity', '%kernel.project_dir%/src/CourseBundle/Entity', '%kernel.project_dir%/src/CoreBundle/ApiResource',]
patch_formats:
json: ['application/merge-patch+json']
swagger:
versions: [3]
api_keys:
apiKey:
name: Authorization
type: header
formats:
jsonld: ['application/ld+json']
jsonhal: ['application/hal+json']
jsonapi: ['application/vnd.api+json']
json: ['application/json']
xml: ['application/xml', 'text/xml']
yaml: ['application/x-yaml']
csv: ['text/csv']
html: ['text/html']
graphql: ['application/graphql']
collection:
pagination:
items_per_page_parameter_name: itemsPerPage # Default value
http_cache:
invalidation:
enabled: true
enable_docs: true
enable_entrypoint: true
show_webby: false
messenger: true
defaults:
pagination_client_items_per_page: true
cache_headers:
# Automatically generate etags for API responses.
etag: true
# Default value for the response max age.
max_age: 0
exception_to_status:
# default api platform https://api-platform.com/docs/core/errors/#converting-php-exceptions-to-http-errors
Symfony\Component\Serializer\Exception\ExceptionInterface: 400
# Or with a constant defined in the 'Symfony\Component\HttpFoundation\Response' class.
ApiPlatform\Core\Exception\InvalidArgumentException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
ApiPlatform\Core\Exception\FilterValidationException: 400
Doctrine\ORM\OptimisticLockException: 409
Doctrine\DBAL\Exception\UniqueConstraintViolationException: 409
metadata_backward_compatibility_layer: false
# mercure:
# hub_url: '%env(MERCURE_SUBSCRIBE_URL)%'
#doctrine:
# orm:
# filters:
# user_filter:
# class: Chamilo\CoreBundle\Filter\UserFilter