Skip to content

Commit 17b1aab

Browse files
committed
Issue #8: Fixed Collection path generated in RoutesDelegator
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 91531f4 commit 17b1aab

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-maker/.
1414
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/issues)
1515
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/network)
1616
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/stargazers)
17-
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE.md)
17+
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE)
1818

1919
[![Build Static](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-maker/actions/workflows/continuous-integration.yml)
2020
[![codecov](https://codecov.io/gh/dotkernel/dot-maker/graph/badge.svg?token=KT9UA402B4)](https://codecov.io/gh/dotkernel/dot-maker)

src/Type/RoutesDelegator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ public function render(
140140
$invoke->appendBody(
141141
sprintf(
142142
'->get(\'/%s\', %s, \'%s::list-%s\')',
143-
$entity->toKebabCase(),
143+
Component::pluralize($entity->toKebabCase()),
144144
$apiGetCollectionHandler->getComponent()->getClassString(),
145145
$entity->toKebabCase(),
146-
$entity->toKebabCase(),
146+
Component::pluralize($entity->toKebabCase()),
147147
),
148148
12
149149
);

test/Type/RoutesDelegatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function __invoke(
224224
\$routeCollector
225225
->delete('/book-store/' . \$uuid, DeleteBookStoreResourceHandler::class, 'book-store::delete-book-store')
226226
->get('/book-store/' . \$uuid, GetBookStoreResourceHandler::class, 'book-store::view-book-store')
227-
->get('/book-store', GetBookStoreCollectionHandler::class, 'book-store::list-book-store')
227+
->get('/book-stores', GetBookStoreCollectionHandler::class, 'book-store::list-book-stores')
228228
->patch('/book-store/' . \$uuid, PatchBookStoreResourceHandler::class, 'book-store::update-book-store')
229229
->post('/book-store', PostBookStoreResourceHandler::class, 'book-store::create-book-store')
230230
->put('/book-store/' . \$uuid, PutBookStoreResourceHandler::class, 'book-store::replace-book-store');

0 commit comments

Comments
 (0)