Skip to content

Commit be57e2c

Browse files
authored
Merge pull request #367 from lyrixx/path-resolver
Fixed doc about "path_segment_name_generator" for v2.1+
2 parents 1e5034c + 24f0452 commit be57e2c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/operation-path-naming.md

Lines changed: 7 additions & 7 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
@@ -75,5 +75,5 @@ services:
7575
# app/config/config.yml
7676
7777
api_platform:
78-
default_operation_path_resolver: 'AppBundle\PathResolver\NoSeparatorsOperationPathResolver'
78+
path_segment_name_generator: 'AppBundle\PathResolver\NoSeparatorsOperationPathResolver'
7979
```

0 commit comments

Comments
 (0)