Skip to content

Commit b1535b2

Browse files
committed
Update the configuration documentation
1 parent a41cb00 commit b1535b2

File tree

1 file changed

+68
-11
lines changed

1 file changed

+68
-11
lines changed

core/configuration.md

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,28 @@ api_platform:
1616
# The version of the API.
1717
version: '0.0.0'
1818

19-
# Specify the default operation path resolver to use for generating resources operations path.
20-
default_operation_path_resolver: 'api_platform.operation_path_resolver.underscore'
21-
2219
# Specify a name converter to use.
2320
name_converter: ~
2421

22+
# Specify a path name generator to use.
23+
path_segment_name_generator: 'api_platform.path_segment_name_generator.underscore'
24+
2525
# Specify a name for the folder within bundle that contain api resources.
2626
api_resources_directory: 'Entity'
2727

2828
eager_loading:
2929
# To enable or disable eager loading.
3030
enabled: true
3131

32+
# Fetch only partial data according to serialization groups.
33+
# If enabled, Doctrine ORM entities will not work as expected if any of the other fields are used.
34+
fetch_partial: false
35+
3236
# Max number of joined relations before EagerLoading throws a RuntimeException.
3337
max_joins: 30
3438

35-
# Force join on every relation. If disabled, it will only join relations having the EAGER fetch mode.
39+
# Force join on every relation.
40+
# If disabled, it will only join relations having the EAGER fetch mode.
3641
force_eager: true
3742

3843
# Enable the FOSUserBundle integration.
@@ -47,9 +52,38 @@ api_platform:
4752
# Enable Swagger ui.
4853
enable_swagger_ui: true
4954

55+
oauth:
56+
# To enable or disable oauth.
57+
enabled: false
58+
59+
# The oauth client id.
60+
clientId: ''
61+
62+
# The oauth client secret.
63+
clientSecret: ''
64+
65+
# The oauth type.
66+
type: 'oauth2'
67+
68+
# The oauth flow grant type.
69+
flow: 'application'
70+
71+
# The oauth token url.
72+
tokenUrl: '/oauth/v2/token'
73+
74+
# The oauth authentication url.
75+
authorizationUrl: '/oauth/v2/auth'
76+
77+
# The oauth scopes.
78+
scopes: []
79+
80+
swagger:
81+
# The swagger api keys.
82+
api_keys: []
83+
5084
collection:
5185
# The default order of results.
52-
order: ~
86+
order: 'ASC'
5387

5488
# The name of the query parameter to order results.
5589
order_parameter_name: 'order'
@@ -79,6 +113,33 @@ api_platform:
79113
# The name of the query parameter to set the number of items per page.
80114
items_per_page_parameter_name: 'itemsPerPage'
81115

116+
mapping:
117+
# The list of paths with files or directories where the bundle will look for additional resource files.
118+
paths: []
119+
120+
http_cache:
121+
# Automatically generate etags for API responses.
122+
etag: true
123+
124+
# Default value for the response max age.
125+
max_age: ~
126+
127+
# Default value for the response shared (proxy) max age.
128+
shared_max_age: ~
129+
130+
# Default values of the "Vary" HTTP header.
131+
vary: ['Accept']
132+
133+
# To make all responses public by default.
134+
public: ~
135+
136+
invalidation:
137+
# To enable the tags-based cache invalidation system.
138+
enabled: false
139+
140+
# URLs of the Varnish servers to purge using cache tags when a resource is updated.
141+
varnish_urls: []
142+
82143
# The list of exceptions mapped to their HTTP status code.
83144
exception_to_status:
84145
# With a status code.
@@ -106,15 +167,11 @@ api_platform:
106167
error_formats:
107168
jsonproblem:
108169
mime_types: ['application/problem+json']
109-
170+
110171
jsonld:
111172
mime_types: ['application/ld+json']
112-
173+
113174
# ...
114-
115-
# The list of paths with files or directories where the bundle will look for additional resource files.
116-
mapping:
117-
paths: ['%kernel.project_dir%/src/Entity']
118175
```
119176

120177
Previous chapter: [Getting Started](getting-started.md)

0 commit comments

Comments
 (0)