Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c90713b

Browse files
committed
fix: path references in YAML config snippets
1 parent f46ed05 commit c90713b

40 files changed

+161
-161
lines changed

‎admin/getting-started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default () => (
4242
Be sure to make your API send proper [CORS HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) to allow
4343
the admin's domain to access it.
4444

45-
To do so, if you use the API Platform Distribution, update the value of the `CORS_ALLOW_ORIGIN` parameter in `api/.env` (it will be set to `^https?://localhost:?[0-9]*$`
45+
To do so, if you use the API Platform Distribution, update the value of the `CORS_ALLOW_ORIGIN` parameter in `.env` (it will be set to `^https?://localhost:?[0-9]*$`
4646
by default).
4747

4848
If you use a custom installation of Symfony and [API Platform Core](../core/), you will need to adjust the [NelmioCorsBundle configuration](https://github.com/nelmio/NelmioCorsBundle#configuration) to expose the `Link` HTTP header and to send proper CORS headers on the route under which the API will be served (`/api` by default).

‎core/configuration.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Here's the complete configuration of the Symfony bundle including default values:
44

55
```yaml
6-
# api/config/packages/api_platform.yaml
6+
# config/packages/api_platform.yaml
77
api_platform:
88

99
# The title of the API.
@@ -322,7 +322,7 @@ api_platform:
322322
If you need to globally configure all the resources instead of adding configuration in each one, it's possible to do so with the `defaults` key:
323323

324324
```yaml
325-
# api/config/packages/api_platform.yaml
325+
# config/packages/api_platform.yaml
326326
api_platform:
327327

328328
defaults:

‎core/content-negotiation.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The first required step is to configure allowed formats. The following configura
4141
and of a custom format called `myformat` and having `application/vnd.myformat` as [MIME type](https://en.wikipedia.org/wiki/Media_type).
4242

4343
```yaml
44-
# api/config/packages/api_platform.yaml
44+
# config/packages/api_platform.yaml
4545
api_platform:
4646
formats:
4747
jsonld: ['application/ld+json']
@@ -68,7 +68,7 @@ Support for the JSON:API PATCH format is automatically enabled if JSON:API suppo
6868
JSON Merge Patch support must be enabled explicitly:
6969

7070
```yaml
71-
# api/config/packages/api_platform.yaml
71+
# config/packages/api_platform.yaml
7272
api_platform:
7373
patch_formats:
7474
json: ['application/merge-patch+json']
@@ -84,7 +84,7 @@ API Platform will try to send to the client the error format matching with the f
8484
Available formats can also be configured:
8585

8686
```yaml
87-
# api/config/packages/api_platform.yaml
87+
# config/packages/api_platform.yaml
8888
api_platform:
8989
error_formats:
9090
jsonproblem: ['application/problem+json']
@@ -197,7 +197,7 @@ Refer to the Symfony documentation to learn [how to create and register such cla
197197
Then, register the new format in the configuration:
198198

199199
```yaml
200-
# api/config/packages/api_platform.yaml
200+
# config/packages/api_platform.yaml
201201
api_platform:
202202
formats:
203203
# ...
@@ -214,7 +214,7 @@ Using composition is the recommended way to implement a custom normalizer. You c
214214
own implementation of `CustomItemNormalizer`:
215215

216216
```yaml
217-
# api/config/services.yaml
217+
# config/services.yaml
218218
services:
219219
'App\Serializer\CustomItemNormalizer':
220220
arguments: [ '@api_platform.serializer.normalizer.item' ]

‎core/controllers.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ implements the [Action-Domain-Responder](https://github.com/pmjones/adr) pattern
1313
[MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller).
1414

1515
The distribution of API Platform also eases the implementation of the ADR pattern: it automatically registers action classes
16-
stored in `api/src/Controller` as autowired services.
16+
stored in `src/Controller` as autowired services.
1717

1818
Thanks to the [autowiring](http://symfony.com/doc/current/components/dependency_injection/autowiring.html) feature of the
1919
Symfony Dependency Injection container, services required by an action can be type-hinted in its constructor, it will be
@@ -106,7 +106,7 @@ class Book
106106
```
107107

108108
```yaml
109-
# api/config/api_platform/resources.yaml
109+
# config/api_platform/resources.yaml
110110
App\Entity\Book:
111111
itemOperations:
112112
get: ~
@@ -178,7 +178,7 @@ class Book
178178
```
179179

180180
```yaml
181-
# api/config/api_platform/resources.yaml
181+
# config/api_platform/resources.yaml
182182
App\Entity\Book:
183183
itemOperations:
184184
get: ~
@@ -248,7 +248,7 @@ class Book
248248
```
249249

250250
```yaml
251-
# api/config/api_platform/resources.yaml
251+
# config/api_platform/resources.yaml
252252
App\Entity\Book:
253253
itemOperations:
254254
get: ~
@@ -321,7 +321,7 @@ class Book
321321
```
322322

323323
```yaml
324-
# api/config/api_platform/resources.yaml
324+
# config/api_platform/resources.yaml
325325
App\Entity\Book:
326326
itemOperations:
327327
get: ~
@@ -418,7 +418,7 @@ class BookController extends AbstractController
418418
```
419419

420420
```yaml
421-
# api/config/routes.yaml
421+
# config/routes.yaml
422422
book_post_publication:
423423
path: /books/{id}/publication
424424
methods: ['POST']

‎core/data-persisters.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Otherwise, if you use a custom dependency injection configuration, you need to r
6363
`api_platform.data_persister` tag. The `priority` attribute can be used to order persisters.
6464

6565
```yaml
66-
# api/config/services.yaml
66+
# config/services.yaml
6767
services:
6868
# ...
6969
App\DataPersister\BlogPostDataPersister: ~
@@ -138,7 +138,7 @@ final class UserDataPersister implements ContextAwareDataPersisterInterface
138138
Even with service autowiring and autoconfiguration enabled, you must still configure the decoration:
139139

140140
```yaml
141-
# api/config/services.yaml
141+
# config/services.yaml
142142
services:
143143
# ...
144144
App\DataPersister\UserDataPersister:
@@ -229,7 +229,7 @@ final class BlogPostDataPersister implements ContextAwareDataPersisterInterface,
229229
```
230230

231231
```yaml
232-
# api/config/services.yaml
232+
# config/services.yaml
233233
services:
234234
# ...
235235
App\DataPersister\BlogPostDataPersister: ~

‎core/data-providers.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you use the default configuration, the corresponding service will be automati
6464
To declare the service explicitly, or to set a custom priority, you can use the following snippet:
6565

6666
```yaml
67-
# api/config/services.yaml
67+
# config/services.yaml
6868
services:
6969
# ...
7070
'App\DataProvider\BlogPostCollectionDataProvider':
@@ -118,7 +118,7 @@ Otherwise, if you use a custom dependency injection configuration, you need to r
118118
providers.
119119

120120
```yaml
121-
# api/config/services.yaml
121+
# config/services.yaml
122122
services:
123123
# ...
124124
'App\DataProvider\BlogPostItemDataProvider': ~
@@ -163,7 +163,7 @@ final class BlogPostSubresourceDataProvider implements SubresourceDataProviderIn
163163
Declare the service in your services configuration:
164164

165165
```yaml
166-
# api/config/services.yaml
166+
# config/services.yaml
167167
services:
168168
# ...
169169
'App\DataProvider\BlogPostSubresourceDataProvider':

‎core/default-order.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Book
2929
```
3030

3131
```yaml
32-
# api/config/api_platform/resources/Book.yaml
32+
# config/api_platform/resources/Book.yaml
3333
App\Entity\Book:
3434
attributes:
3535
order:
@@ -70,7 +70,7 @@ class Book
7070
```
7171

7272
```yaml
73-
# api/config/api_platform/resources/Book.yaml
73+
# config/api_platform/resources/Book.yaml
7474
App\Entity\Book:
7575
attributes:
7676
order: ['foo', 'bar']
@@ -104,7 +104,7 @@ class Book
104104
```
105105

106106
```yaml
107-
# api/config/api_platform/resources/Book.yaml
107+
# config/api_platform/resources/Book.yaml
108108
App\Entity\Book:
109109
attributes:
110110
order: ['author.username']
@@ -146,7 +146,7 @@ class Book
146146
```
147147

148148
```yaml
149-
# api/config/api_platform/resources/Book.yaml
149+
# config/api_platform/resources/Book.yaml
150150
App\Entity\Book:
151151
get: ~
152152
get_desc_custom:

‎core/deprecations.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Review
9191
```
9292

9393
```yaml
94-
# api/config/api_platform/resources/Review.yaml
94+
# config/api_platform/resources/Review.yaml
9595
resources:
9696
# ...
9797
App\Entity\Review:

‎core/dto.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class Book
2929
```
3030

3131
```yaml
32-
# api/config/api_platform/resources.yaml
32+
# config/api_platform/resources.yaml
3333
resources:
3434
App\Entity\Book:
3535
attributes:
@@ -129,7 +129,7 @@ final class BookInputDataTransformer implements DataTransformerInterface
129129
We now register it:
130130

131131
```yaml
132-
# api/config/services.yaml
132+
# config/services.yaml
133133
services:
134134
# ...
135135
'App\DataTransformer\BookInputDataTransformer': ~
@@ -192,7 +192,7 @@ final class BookOutputDataTransformer implements DataTransformerInterface
192192
We now register it:
193193

194194
```yaml
195-
# api/config/services.yaml
195+
# config/services.yaml
196196
services:
197197
# ...
198198
'App\DataTransformer\BookOutputDataTransformer': ~
@@ -267,7 +267,7 @@ final class BookInputDataTransformer implements DataTransformerInterface
267267
```
268268

269269
```yaml
270-
# api/config/services.yaml
270+
# config/services.yaml
271271
services:
272272
# ...
273273
'App\DataTransformer\BookInputDataTransformer': ~
@@ -340,7 +340,7 @@ final class BookInputDataTransformerInitializer implements DataTransformerInitia
340340
Register it:
341341

342342
```yaml
343-
# api/config/services.yaml
343+
# config/services.yaml
344344
services:
345345
# ...
346346
'App\DataTransformer\BookInputDataTransformerInitializer': ~
@@ -392,7 +392,7 @@ final class Book
392392
```
393393

394394
```yaml
395-
# api/config/api_platform/resources.yaml
395+
# config/api_platform/resources.yaml
396396
resources:
397397
App\Entity\Book:
398398
collectionOperations:

‎core/elasticsearch.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ composer require elasticsearch/elasticsearch:^6.0
2121
Then, enable it inside the API Platform configuration:
2222

2323
```yaml
24-
# api/config/packages/api_platform.yaml
24+
# config/packages/api_platform.yaml
2525
parameters:
2626
# ...
2727
env(ELASTICSEARCH_HOST): 'http://localhost:9200'
@@ -210,7 +210,7 @@ For example, consider an index being similar to a database in an SQL database an
210210
So the `User` and `Tweet` resources of the previous example would become `user` and `tweet` types in an index named `app`:
211211

212212
```yaml
213-
# api/config/packages/api_platform.yaml
213+
# config/packages/api_platform.yaml
214214
parameters:
215215
# ...
216216
env(ELASTICSEARCH_HOST): 'http://localhost:9200'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /