From b1535b2a720113e3d05746be23daab4ec8e2a2ed Mon Sep 17 00:00:00 2001 From: meyerbaptiste Date: Fri, 8 Sep 2017 14:55:36 +0200 Subject: [PATCH] Update the configuration documentation --- core/configuration.md | 79 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 11 deletions(-) diff --git a/core/configuration.md b/core/configuration.md index ed958213dad..adc12793a3d 100644 --- a/core/configuration.md +++ b/core/configuration.md @@ -16,12 +16,12 @@ api_platform: # The version of the API. version: '0.0.0' - # Specify the default operation path resolver to use for generating resources operations path. - default_operation_path_resolver: 'api_platform.operation_path_resolver.underscore' - # Specify a name converter to use. name_converter: ~ + # Specify a path name generator to use. + path_segment_name_generator: 'api_platform.path_segment_name_generator.underscore' + # Specify a name for the folder within bundle that contain api resources. api_resources_directory: 'Entity' @@ -29,10 +29,15 @@ api_platform: # To enable or disable eager loading. enabled: true + # Fetch only partial data according to serialization groups. + # If enabled, Doctrine ORM entities will not work as expected if any of the other fields are used. + fetch_partial: false + # Max number of joined relations before EagerLoading throws a RuntimeException. max_joins: 30 - # Force join on every relation. If disabled, it will only join relations having the EAGER fetch mode. + # Force join on every relation. + # If disabled, it will only join relations having the EAGER fetch mode. force_eager: true # Enable the FOSUserBundle integration. @@ -47,9 +52,38 @@ api_platform: # Enable Swagger ui. enable_swagger_ui: true + oauth: + # To enable or disable oauth. + enabled: false + + # The oauth client id. + clientId: '' + + # The oauth client secret. + clientSecret: '' + + # The oauth type. + type: 'oauth2' + + # The oauth flow grant type. + flow: 'application' + + # The oauth token url. + tokenUrl: '/oauth/v2/token' + + # The oauth authentication url. + authorizationUrl: '/oauth/v2/auth' + + # The oauth scopes. + scopes: [] + + swagger: + # The swagger api keys. + api_keys: [] + collection: # The default order of results. - order: ~ + order: 'ASC' # The name of the query parameter to order results. order_parameter_name: 'order' @@ -79,6 +113,33 @@ api_platform: # The name of the query parameter to set the number of items per page. items_per_page_parameter_name: 'itemsPerPage' + mapping: + # The list of paths with files or directories where the bundle will look for additional resource files. + paths: [] + + http_cache: + # Automatically generate etags for API responses. + etag: true + + # Default value for the response max age. + max_age: ~ + + # Default value for the response shared (proxy) max age. + shared_max_age: ~ + + # Default values of the "Vary" HTTP header. + vary: ['Accept'] + + # To make all responses public by default. + public: ~ + + invalidation: + # To enable the tags-based cache invalidation system. + enabled: false + + # URLs of the Varnish servers to purge using cache tags when a resource is updated. + varnish_urls: [] + # The list of exceptions mapped to their HTTP status code. exception_to_status: # With a status code. @@ -106,15 +167,11 @@ api_platform: error_formats: jsonproblem: mime_types: ['application/problem+json'] - + jsonld: mime_types: ['application/ld+json'] - + # ... - - # The list of paths with files or directories where the bundle will look for additional resource files. - mapping: - paths: ['%kernel.project_dir%/src/Entity'] ``` Previous chapter: [Getting Started](getting-started.md)