Skip to content

Commit 56b5729

Browse files
committed
Fixed doc about "path_segment_name_generator" for v2.1+
1 parent 1e5034c commit 56b5729

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/operation-path-naming.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ Pre-registered resolvers are available and can easily be overridden.
77

88
There are two pre-registered operation path naming services:
99

10-
Service name | Entity name | Path result
11-
--------------------------------------------------|--------------|----------------
12-
`api_platform.operation_path_resolver.underscore` | `MyResource` | `/my_resources`
13-
`api_platform.operation_path_resolver.dash` | `MyResource` | `/my-resources`
10+
Service name | Entity name | Path result
11+
------------------------------------------------------|--------------|----------------
12+
`api_platform.path_segment_name_generator.underscore` | `MyResource` | `/my_resources`
13+
`api_platform.path_segment_name_generator.dash` | `MyResource` | `/my-resources`
1414

15-
The default resolver is `api_platform.operation_path_resolver.underscore`.
15+
The default resolver is `api_platform.path_segment_name_generator.underscore`.
1616
To change it to the dash resolver, add the following lines to `app/config/config.yml`:
1717

1818
```yaml
1919
# app/config/config.yml
2020

2121
api_platform:
22-
default_operation_path_resolver: 'api_platform.operation_path_resolver.dash'
22+
path_segment_name_generator: api_platform.path_segment_name_generator.dash
2323
```
2424
2525
## Create a Custom Operation Path Resolver

0 commit comments

Comments
 (0)