@@ -21,8 +21,8 @@ To deprecate a resource class, use the `deprecationReason` attribute:
21
21
22
22
``` php
23
23
<?php
24
- // api/src/Entity /Parchment.php
25
- namespace App\Entity ;
24
+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
25
+ namespace App\ApiResource ;
26
26
27
27
use ApiPlatform\Metadata\ApiResource;
28
28
@@ -51,8 +51,8 @@ You can also use this new `deprecationReason` attribute to deprecate specific [o
51
51
52
52
``` php
53
53
<?php
54
- // api/src/Entity /Parchment.php
55
- namespace App\Entity ;
54
+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
55
+ namespace App\ApiResource ;
56
56
57
57
use ApiPlatform\Metadata\ApiResource;
58
58
use ApiPlatform\Metadata\Get;
@@ -71,8 +71,8 @@ It's also possible to deprecate a single property:
71
71
72
72
``` php
73
73
<?php
74
- // api/src/Entity /Review.php
75
- namespace App\Entity ;
74
+ // api/src/ApiResource /Review.php with Symfony or app/ApiResource/Review.php with Laravel
75
+ namespace App\ApiResource ;
76
76
77
77
use ApiPlatform\Metadata\ApiResource;
78
78
use ApiPlatform\Metadata\ApiProperty;
@@ -91,9 +91,10 @@ class Review
91
91
92
92
``` yaml
93
93
# api/config/api_platform/resources/Review.yaml
94
+ # The YAML syntax is only supported for Symfony
94
95
properties :
95
96
# ...
96
- App\Entity \Review :
97
+ App\ApiResource \Review :
97
98
# ...
98
99
letter :
99
100
deprecationReason : ' Use the rating property instead'
@@ -114,8 +115,8 @@ Thanks to the `sunset` attribute, API Platform makes it easy to set this header
114
115
115
116
` ` ` php
116
117
<?php
117
- // api/src/Entity /Parchment.php
118
- namespace App\E ntity ;
118
+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
119
+ namespace App\A piResource ;
119
120
120
121
use ApiPlatform\M etadata\A piResource;
121
122
@@ -136,8 +137,8 @@ It's also possible to set the `Sunset` header only for a specific [operation](op
136
137
137
138
` ` ` php
138
139
<?php
139
- // api/src/Entity /Parchment.php
140
- namespace App\E ntity ;
140
+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
141
+ namespace App\A piResource ;
141
142
142
143
use ApiPlatform\M etadata\A piResource;
143
144
use ApiPlatform\M etadata\G et;
@@ -162,8 +163,8 @@ You can prefix your URI Templates and change the representation using serializat
162
163
163
164
` ` ` php
164
165
<?php
165
- // api/src/Entity /Parchment.php
166
- namespace App\M odel ;
166
+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
167
+ namespace App\A piResource ;
167
168
168
169
use ApiPlatform\M etadata\G et;
169
170
use Symfony\C omponent\S erializer\A ttrbute\G roups;
0 commit comments