@@ 241-243 (lines=3) @@ | ||
238 | $swaggerOperation[$methodSwagger]['produces'] = $this->mimeTypes; |
|
239 | ||
240 | if ($collection) { |
|
241 | if (!isset($swaggerOperation[$methodSwagger]['title'])) { |
|
242 | $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves the collection of %s resources.', $shortName); |
|
243 | } |
|
244 | ||
245 | $swaggerOperation[$methodSwagger]['responses'] = [ |
|
246 | '200' => [ |
|
@@ 257-259 (lines=3) @@ | ||
254 | break; |
|
255 | } |
|
256 | ||
257 | if (!isset($swaggerOperation[$methodSwagger]['title'])) { |
|
258 | $swaggerOperation[$methodSwagger]['summary'] = sprintf('Retrieves %s resource.', $shortName); |
|
259 | } |
|
260 | ||
261 | $swaggerOperation[$methodSwagger]['parameters'][] = [ |
|
262 | 'name' => 'id', |
|
@@ 280-282 (lines=3) @@ | ||
277 | case 'POST': |
|
278 | $swaggerOperation[$methodSwagger]['consumes'] = $swaggerOperation[$methodSwagger]['produces'] = $this->mimeTypes; |
|
279 | ||
280 | if (!isset($swaggerOperation[$methodSwagger]['title'])) { |
|
281 | $swaggerOperation[$methodSwagger]['summary'] = sprintf('Creates a %s resource.', $shortName); |
|
282 | } |
|
283 | ||
284 | if ($this->resourceClassResolver->isResourceClass($resourceClass)) { |
|
285 | $swaggerOperation[$methodSwagger]['parameters'][] = [ |
|
@@ 308-310 (lines=3) @@ | ||
305 | case 'PUT': |
|
306 | $swaggerOperation[$methodSwagger]['consumes'] = $swaggerOperation[$methodSwagger]['produces'] = $this->mimeTypes; |
|
307 | ||
308 | if (!isset($swaggerOperation[$methodSwagger]['title'])) { |
|
309 | $swaggerOperation[$methodSwagger]['summary'] = sprintf('Replaces the %s resource.', $shortName); |
|
310 | } |
|
311 | ||
312 | if ($this->resourceClassResolver->isResourceClass($resourceClass)) { |
|
313 | $swaggerOperation[$methodSwagger]['parameters'] = [ |