Skip to content

Commit e79a8c4

Browse files
committed
updated config to include version factory definition
1 parent 0773e7e commit e79a8c4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

config/api.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
'version_designator' => 'v',
1010
'versions' => [
11-
4 => [
12-
'vendor' => 'vnd.wps_api.',
11+
1 => [
12+
'vendor' => 'vnd.your_api.',
1313
'media' => [
1414
'types' => ['json'],
1515
'default' => 'json',
@@ -18,11 +18,13 @@
1818
'page_size' => 10,
1919
'current_position' => 'current',
2020
],
21+
// This is typically used for testing for getting ids for routes that are non-standard.
2122
'resourceIdsMap' => [
22-
'/catalogs/{random_id}/catalogtabs' => function () {
23-
return (new\LaraPackage\RandomId\TableFetcher)->getRandomColumnEntries('catalogtabs', ['catalog_id']);
23+
'/your/{random_id}/route' => function () {
24+
return (new \LaraPackage\RandomId\TableFetcher)->getRandomColumnEntries('table', ['column_id']);
2425
},
2526
],
27+
'factory' => \LaraPackage\Api\Factory\VersionFactory::class,
2628
],
2729
],
2830
];

0 commit comments

Comments
 (0)