Skip to content

Update the configuration documentation #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 68 additions & 11 deletions core/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@ 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'

eager_loading:
# 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.
Expand All @@ -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'
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down