diff --git a/README.md b/README.md index 23cd657..64e4125 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Documentation is available at: https://docs.dotkernel.org/dot-maker/. [![GitHub issues](https://img.shields.io/github/issues/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/issues) [![GitHub forks](https://img.shields.io/github/forks/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/network) [![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/stargazers) -[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE.md) +[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-maker)](https://github.com/dotkernel/dot-maker/blob/1.0/LICENSE) [![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) [![codecov](https://codecov.io/gh/dotkernel/dot-maker/graph/badge.svg?token=KT9UA402B4)](https://codecov.io/gh/dotkernel/dot-maker) diff --git a/src/Type/RoutesDelegator.php b/src/Type/RoutesDelegator.php index 4ebe7d3..19633e0 100644 --- a/src/Type/RoutesDelegator.php +++ b/src/Type/RoutesDelegator.php @@ -140,10 +140,10 @@ public function render( $invoke->appendBody( sprintf( '->get(\'/%s\', %s, \'%s::list-%s\')', - $entity->toKebabCase(), + Component::pluralize($entity->toKebabCase()), $apiGetCollectionHandler->getComponent()->getClassString(), $entity->toKebabCase(), - $entity->toKebabCase(), + Component::pluralize($entity->toKebabCase()), ), 12 ); diff --git a/test/Type/RoutesDelegatorTest.php b/test/Type/RoutesDelegatorTest.php index 36823a5..671b7e3 100644 --- a/test/Type/RoutesDelegatorTest.php +++ b/test/Type/RoutesDelegatorTest.php @@ -224,7 +224,7 @@ public function __invoke( \$routeCollector ->delete('/book-store/' . \$uuid, DeleteBookStoreResourceHandler::class, 'book-store::delete-book-store') ->get('/book-store/' . \$uuid, GetBookStoreResourceHandler::class, 'book-store::view-book-store') - ->get('/book-store', GetBookStoreCollectionHandler::class, 'book-store::list-book-store') + ->get('/book-stores', GetBookStoreCollectionHandler::class, 'book-store::list-book-stores') ->patch('/book-store/' . \$uuid, PatchBookStoreResourceHandler::class, 'book-store::update-book-store') ->post('/book-store', PostBookStoreResourceHandler::class, 'book-store::create-book-store') ->put('/book-store/' . \$uuid, PutBookStoreResourceHandler::class, 'book-store::replace-book-store');