|
64 | 64 | ], |
65 | 65 | ], |
66 | 66 | ], |
| 67 | + 'test.rest.bands' => [ |
| 68 | + 'type' => 'Segment', |
| 69 | + 'options' => [ |
| 70 | + 'route' => '/bands[/:band_id]', |
| 71 | + 'defaults' => [ |
| 72 | + 'controller' => 'Test\\V1\\Rest\\Bands\\Controller', |
| 73 | + ], |
| 74 | + ], |
| 75 | + ], |
67 | 76 | ], |
68 | 77 | ], |
69 | 78 | 'zf-versioning' => [ |
|
80 | 89 | 'Test\\V1\\Rest\\FooBar\\FooBarResource' => 'Test\\V1\\Rest\\FooBar\\FooBarResource', |
81 | 90 | 'Test\\V1\\Rest\\FooBarCollection\\FooBarResource' => 'Test\\V1\\Rest\\FooBarCollection\\FooBarResource', |
82 | 91 | 'Test\\V1\\Rest\\BooBaz\\BooBazResource' => 'Test\\V1\\Rest\\BooBaz\\BooBazResource', |
| 92 | + 'Test\\V1\\Rest\\Bands\\BandsResource' => 'Test\\V1\\Rest\\Bands\\BandsResource', |
83 | 93 | ], |
84 | 94 | ], |
85 | 95 | 'zf-rest' => [ |
|
166 | 176 | 'collection_class' => 'Test\\V1\\Rest\\EntityFields\\EntityFieldsCollection', |
167 | 177 | 'service_name' => 'EntityFields', |
168 | 178 | ], |
| 179 | + 'Test\\V1\\Rest\\Bands\\Controller' => [ |
| 180 | + 'listener' => 'Test\\V1\\Rest\\Bands\\BandsResource', |
| 181 | + 'route_name' => 'test.rest.bands', |
| 182 | + 'route_identifier_name' => 'artist_id', |
| 183 | + 'collection_name' => 'foo_bar', |
| 184 | + 'entity_http_methods' => [ |
| 185 | + 0 => 'GET', |
| 186 | + 1 => 'PATCH', |
| 187 | + 2 => 'PUT', |
| 188 | + 3 => 'DELETE', |
| 189 | + ], |
| 190 | + 'collection_http_methods' => [ |
| 191 | + 0 => 'GET', |
| 192 | + 1 => 'POST', |
| 193 | + ], |
| 194 | + 'collection_query_whitelist' => [], |
| 195 | + 'page_size' => 25, |
| 196 | + 'page_size_param' => null, |
| 197 | + 'entity_class' => 'Test\\V1\\Rest\\Bands\\ArtistEntity', |
| 198 | + 'collection_class' => 'Test\\V1\\Rest\\Bands\\ArtistCollection', |
| 199 | + 'service_name' => 'Bands', |
| 200 | + ], |
169 | 201 | ], |
170 | 202 | 'zf-content-negotiation' => [ |
171 | 203 | 'controllers' => [ |
|
174 | 206 | 'Test\\V1\\Rest\\BooBaz\\Controller' => 'HalJson', |
175 | 207 | 'Test\\V1\\Rpc\\MyRpc\\Controller' => 'Json', |
176 | 208 | 'Test\\V1\\Rpc\\Ping\\Controller' => 'Json', |
| 209 | + 'Test\\V1\\Rest\\Bands\\Controller' => 'HalJson', |
177 | 210 | ], |
178 | 211 | 'accept_whitelist' => [ |
179 | 212 | 'Test\\V1\\Rest\\FooBar\\Controller' => [ |
|
206 | 239 | 1 => 'application/json', |
207 | 240 | 2 => 'application/*+json', |
208 | 241 | ], |
| 242 | + 'Test\\V1\\Rest\\Bands\\Controller' => [ |
| 243 | + 0 => 'application/vnd.test.v1+json', |
| 244 | + 1 => 'application/hal+json', |
| 245 | + 2 => 'application/json', |
| 246 | + ], |
209 | 247 | ], |
210 | 248 | 'content_type_whitelist' => [ |
211 | 249 | 'Test\\V1\\Rest\\FooBar\\Controller' => [ |
|
232 | 270 | 0 => 'application/vnd.test.v1+json', |
233 | 271 | 1 => 'application/json', |
234 | 272 | ], |
| 273 | + 'Test\\V1\\Rest\\Bands\\Controller' => [ |
| 274 | + 0 => 'application/vnd.test.v1+json', |
| 275 | + 1 => 'application/json', |
| 276 | + ], |
235 | 277 | ], |
236 | 278 | ], |
237 | 279 | 'zf-hal' => [ |
|
266 | 308 | 'route_identifier_name' => 'id', |
267 | 309 | 'is_collection' => true, |
268 | 310 | ], |
| 311 | + 'Test\\V1\\Rest\\Bands\\ArtistEntity' => [ |
| 312 | + 'entity_identifier_name' => 'id', |
| 313 | + 'route_name' => 'test.rest.bands', |
| 314 | + 'route_identifier_name' => 'artist_id', |
| 315 | + 'hydrator' => 'Zend\\Hydrator\\ArraySerializable', |
| 316 | + ], |
269 | 317 | ], |
270 | 318 | ], |
271 | 319 | 'controllers' => [ |
|
301 | 349 | 'input_filter' => 'Test\\V1\\Rest\\EntityFields\\Validator', |
302 | 350 | 'PUT' => 'Test\\V1\\Rest\\EntityFields\\Validator\\Put', |
303 | 351 | ], |
| 352 | + 'Test\\V1\\Rest\\Bands\\Controller' => [ |
| 353 | + 'input_filter' => 'Test\\V1\\Rest\\Bands\\Validator', |
| 354 | + ], |
304 | 355 | ], |
305 | 356 | 'input_filter_specs' => [ |
306 | 357 | 'Test\\V1\\Rest\\FooBar\\Validator' => [ |
|
407 | 458 | 'description' => 'test_put', |
408 | 459 | ], |
409 | 460 | ], |
| 461 | + 'Test\\V1\\Rest\\Bands\\Validator' => [ |
| 462 | + [ |
| 463 | + 'name' => 'name', |
| 464 | + 'required' => true, |
| 465 | + 'description' => 'The name of the Band.', |
| 466 | + ], |
| 467 | + 'artists' => [ |
| 468 | + 'type' => Zend\InputFilter\CollectionInputFilter::class, |
| 469 | + 'input_filter' => [ |
| 470 | + 'type' => \Zend\InputFilter\InputFilter::class, |
| 471 | + 'first_name' => [ |
| 472 | + 'name' => 'first_name', |
| 473 | + 'required' => true, |
| 474 | + 'description' => 'The Artist\'s first name.', |
| 475 | + ], |
| 476 | + 'last_name' => [ |
| 477 | + 'name' => 'last_name', |
| 478 | + 'required' => true, |
| 479 | + 'description' => 'The Artist\'s last name.', |
| 480 | + ], |
| 481 | + ], |
| 482 | + ], |
| 483 | + 'debut_album' => [ |
| 484 | + 'type' => \Zend\InputFilter\InputFilter::class, |
| 485 | + 'title' => [ |
| 486 | + 'name' => 'title', |
| 487 | + 'required' => true, |
| 488 | + 'description' => 'Album title.', |
| 489 | + ], |
| 490 | + 'release_date' => [ |
| 491 | + 'name' => 'release_date', |
| 492 | + 'required' => true, |
| 493 | + 'description' => 'Album release date.', |
| 494 | + ], |
| 495 | + 'tracks' => [ |
| 496 | + 'type' => Zend\InputFilter\CollectionInputFilter::class, |
| 497 | + 'input_filter' => [ |
| 498 | + 'type' => \Zend\InputFilter\InputFilter::class, |
| 499 | + 'number' => [ |
| 500 | + 'name' => 'number', |
| 501 | + 'required' => true, |
| 502 | + 'description' => 'Track number.', |
| 503 | + ], |
| 504 | + 'title' => [ |
| 505 | + 'name' => 'title', |
| 506 | + 'required' => true, |
| 507 | + 'description' => 'Track title.', |
| 508 | + ], |
| 509 | + ], |
| 510 | + ], |
| 511 | + ], |
| 512 | + 'albums' => [ |
| 513 | + 'type' => Zend\InputFilter\CollectionInputFilter::class, |
| 514 | + 'input_filter' => [ |
| 515 | + 'type' => \Zend\InputFilter\InputFilter::class, |
| 516 | + 'title' => [ |
| 517 | + 'name' => 'title', |
| 518 | + 'required' => true, |
| 519 | + 'description' => 'Album title.', |
| 520 | + ], |
| 521 | + 'release_date' => [ |
| 522 | + 'name' => 'release_date', |
| 523 | + 'required' => true, |
| 524 | + 'description' => 'Album release date.', |
| 525 | + ], |
| 526 | + 'tracks' => [ |
| 527 | + 'type' => Zend\InputFilter\CollectionInputFilter::class, |
| 528 | + 'input_filter' => [ |
| 529 | + 'type' => \Zend\InputFilter\InputFilter::class, |
| 530 | + 'number' => [ |
| 531 | + 'name' => 'number', |
| 532 | + 'required' => true, |
| 533 | + 'description' => 'Track number.', |
| 534 | + ], |
| 535 | + 'title' => [ |
| 536 | + 'name' => 'title', |
| 537 | + 'required' => true, |
| 538 | + 'description' => 'Track title.', |
| 539 | + ], |
| 540 | + ], |
| 541 | + ], |
| 542 | + ], |
| 543 | + ], |
| 544 | + ], |
410 | 545 | ], |
411 | 546 | 'zf-mvc-auth' => [ |
412 | 547 | 'authentication' => [ |
|
0 commit comments