Skip to content

Commit 1ca396c

Browse files
edamovteohhanhui
authored andcommitted
Add links to documentation to ApiResource properties
1 parent 8dffbce commit 1ca396c

File tree

1 file changed

+97
-58
lines changed

1 file changed

+97
-58
lines changed

src/Annotation/ApiResource.php

Lines changed: 97 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
* @Attributes(
2626
* @Attribute("accessControl", type="string"),
2727
* @Attribute("accessControlMessage", type="string"),
28-
* @Attribute("security", type="string"),
29-
* @Attribute("securityMessage", type="string"),
30-
* @Attribute("securityPostDenormalize", type="string"),
31-
* @Attribute("securityPostDenormalizeMessage", type="string"),
3228
* @Attribute("attributes", type="array"),
3329
* @Attribute("cacheHeaders", type="array"),
3430
* @Attribute("collectionOperations", type="array"),
@@ -62,6 +58,10 @@
6258
* @Attribute("paginationPartial", type="bool"),
6359
* @Attribute("paginationViaCursor", type="array"),
6460
* @Attribute("routePrefix", type="string"),
61+
* @Attribute("security", type="string"),
62+
* @Attribute("securityMessage", type="string"),
63+
* @Attribute("securityPostDenormalize", type="string"),
64+
* @Attribute("securityPostDenormalizeMessage", type="string"),
6565
* @Attribute("shortName", type="string"),
6666
* @Attribute("subresourceOperations", type="array"),
6767
* @Attribute("sunset", type="string"),
@@ -74,83 +74,66 @@ final class ApiResource
7474
use AttributesHydratorTrait;
7575

7676
/**
77-
* @var string
78-
*/
79-
public $shortName;
80-
81-
/**
82-
* @var string
83-
*/
84-
public $description;
85-
86-
/**
87-
* @var string
88-
*/
89-
public $iri;
90-
91-
/**
92-
* @var array
93-
*/
94-
public $itemOperations;
95-
96-
/**
77+
* @see https://api-platform.com/docs/core/operations
78+
*
9779
* @var array
9880
*/
9981
public $collectionOperations;
10082

10183
/**
102-
* @var array
84+
* @var string
10385
*/
104-
public $subresourceOperations;
86+
public $description;
10587

10688
/**
89+
* @see https://api-platform.com/docs/core/graphql
90+
*
10791
* @var array
10892
*/
10993
public $graphql;
11094

11195
/**
112-
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
113-
*
11496
* @var string
11597
*/
116-
private $security;
98+
public $iri;
11799

118100
/**
119-
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
101+
* @see https://api-platform.com/docs/core/operations
120102
*
121-
* @var string
103+
* @var array
122104
*/
123-
private $securityMessage;
105+
public $itemOperations;
124106

125107
/**
126-
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
127-
*
128108
* @var string
129109
*/
130-
private $securityPostDenormalize;
110+
public $shortName;
131111

132112
/**
133-
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
113+
* @see https://api-platform.com/docs/core/subresources
134114
*
135-
* @var string
115+
* @var array
136116
*/
137-
private $securityPostDenormalizeMessage;
117+
public $subresourceOperations;
138118

139119
/**
120+
* @see https://api-platform.com/docs/core/performance/#setting-custom-http-cache-headers
140121
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
141122
*
142123
* @var array
143124
*/
144125
private $cacheHeaders;
145126

146127
/**
128+
* @see https://api-platform.com/docs/core/serialization/#using-serialization-groups
147129
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
148130
*
149131
* @var array
150132
*/
151133
private $denormalizationContext;
152134

153135
/**
136+
* @see https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
154137
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
155138
*
156139
* @var string
@@ -165,188 +148,244 @@ final class ApiResource
165148
private $elasticsearch;
166149

167150
/**
151+
* @see https://api-platform.com/docs/core/performance/#fetch-partial
168152
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
169153
*
170154
* @var bool
171155
*/
172156
private $fetchPartial;
173157

174158
/**
159+
* @see https://api-platform.com/docs/core/performance/#force-eager
175160
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
176161
*
177162
* @var bool
178163
*/
179164
private $forceEager;
180165

181166
/**
167+
* @see https://api-platform.com/docs/core/content-negotiation/#configuring-formats-for-a-specific-resource-or-operation
182168
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
183169
*
184170
* @var array
185171
*/
186172
private $formats;
187173

188174
/**
175+
* @see https://api-platform.com/docs/core/filters/#doctrine-orm-and-mongodb-odm-filters
189176
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
190177
*
191178
* @var string[]
192179
*/
193180
private $filters;
194181

195182
/**
183+
* @see https://api-platform.com/docs/core/extending-jsonld-context/#hydra
196184
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
197185
*
198186
* @var string[]
199187
*/
200188
private $hydraContext;
201189

202190
/**
191+
* @see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
192+
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
193+
*
194+
* @var string|false
195+
*/
196+
private $input;
197+
198+
/**
199+
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
200+
*
201+
* @var int
202+
*
203+
* @deprecated - Use $paginationMaximumItemsPerPage instead
204+
*/
205+
private $maximumItemsPerPage;
206+
207+
/**
208+
* @see https://api-platform.com/docs/core/mercure
203209
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
204210
*
205211
* @var mixed
206212
*/
207213
private $mercure;
208214

209215
/**
216+
* @see https://api-platform.com/docs/core/messenger/#dispatching-a-resource-through-the-message-bus
210217
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
211218
*
212219
* @var bool|string
213220
*/
214221
private $messenger;
215222

216223
/**
224+
* @see https://api-platform.com/docs/core/serialization/#using-serialization-groups
217225
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
218226
*
219227
* @var array
220228
*/
221229
private $normalizationContext;
222230

223231
/**
232+
* @see https://api-platform.com/docs/core/swagger/#using-the-openapi-and-swagger-contexts
233+
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
234+
*
235+
* @var array
236+
*/
237+
private $openapiContext;
238+
239+
/**
240+
* @see https://api-platform.com/docs/core/default-order/#overriding-default-order
224241
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
225242
*
226243
* @var array
227244
*/
228245
private $order;
229246

230247
/**
248+
* @see https://api-platform.com/docs/core/dto/#specifying-an-input-or-an-output-data-representation
249+
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
250+
*
251+
* @var string|false
252+
*/
253+
private $output;
254+
255+
/**
256+
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-1
231257
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
232258
*
233259
* @var bool
234260
*/
235261
private $paginationClientEnabled;
236262

237263
/**
264+
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-3
238265
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
239266
*
240267
* @var bool
241268
*/
242269
private $paginationClientItemsPerPage;
243270

244271
/**
272+
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource-6
245273
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
246274
*
247275
* @var bool
248276
*/
249277
private $paginationClientPartial;
250278

251279
/**
280+
* @see https://api-platform.com/docs/core/pagination/#cursor-based-pagination
252281
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
253282
*
254-
* @var bool
283+
* @var array
255284
*/
256-
private $paginationEnabled;
285+
private $paginationViaCursor;
257286

258287
/**
288+
* @see https://api-platform.com/docs/core/pagination/#for-a-specific-resource
259289
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
260290
*
261291
* @var bool
262292
*/
263-
private $paginationFetchJoinCollection;
293+
private $paginationEnabled;
264294

265295
/**
296+
* @see https://api-platform.com/docs/core/pagination/#controlling-the-behavior-of-the-doctrine-orm-paginator
266297
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
267298
*
268-
* @var int
299+
* @var bool
269300
*/
270-
private $paginationItemsPerPage;
301+
private $paginationFetchJoinCollection;
271302

272303
/**
304+
* @see https://api-platform.com/docs/core/pagination/#changing-the-number-of-items-per-page
273305
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
274306
*
275307
* @var int
276-
*
277-
* @deprecated - Use $paginationMaximumItemsPerPage instead
278308
*/
279-
private $maximumItemsPerPage;
309+
private $paginationItemsPerPage;
280310

281311
/**
312+
* @see https://api-platform.com/docs/core/pagination/#changing-maximum-items-per-page
282313
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
283314
*
284315
* @var int
285316
*/
286317
private $paginationMaximumItemsPerPage;
287318

288319
/**
320+
* @see https://api-platform.com/docs/core/performance/#partial-pagination
289321
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
290322
*
291323
* @var int
292324
*/
293325
private $paginationPartial;
294326

295327
/**
328+
* @see https://api-platform.com/docs/core/operations/#prefixing-all-routes-of-all-operations
296329
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
297330
*
298331
* @var string
299332
*/
300333
private $routePrefix;
301334

302335
/**
336+
* @see https://api-platform.com/docs/core/security
303337
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
304338
*
305-
* @var array
339+
* @var string
306340
*/
307-
private $swaggerContext;
341+
private $security;
308342

309343
/**
344+
* @see https://api-platform.com/docs/core/security/#configuring-the-access-control-error-message
310345
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
311346
*
312-
* @var mixed
347+
* @var string
313348
*/
314-
private $validationGroups;
349+
private $securityMessage;
315350

316351
/**
352+
* @see https://api-platform.com/docs/core/security/#executing-access-control-rules-after-denormalization
317353
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
318354
*
319355
* @var string
320356
*/
321-
private $sunset;
357+
private $securityPostDenormalize;
322358

323359
/**
324360
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
325361
*
326-
* @var string|false
362+
* @var string
327363
*/
328-
private $input;
364+
private $securityPostDenormalizeMessage;
329365

330366
/**
367+
* @see https://api-platform.com/docs/core/deprecations/#setting-the-sunset-http-header-to-indicate-when-a-resource-or-an-operation-will-be-removed
331368
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
332369
*
333-
* @var string|false
370+
* @var string
334371
*/
335-
private $output;
372+
private $sunset;
336373

337374
/**
375+
* @see https://api-platform.com/docs/core/swagger/#using-the-openapi-and-swagger-contexts
338376
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
339377
*
340378
* @var array
341379
*/
342-
private $openapiContext;
380+
private $swaggerContext;
343381

344382
/**
383+
* @see https://api-platform.com/docs/core/validation/#using-validation-groups
345384
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
346385
*
347-
* @var array
386+
* @var mixed
348387
*/
349-
private $paginationViaCursor;
388+
private $validationGroups;
350389

351390
/**
352391
* @throws InvalidArgumentException

0 commit comments

Comments
 (0)