Closed iwasherefirst2 closed 4 years ago
It's easy to rename the type to singular - i.e. the package fully works if you opt to use singular. It's subjective whether people want to use plural or singular. The logic for using plural is it makes more sense in the URL: /api/dishes/1
vs /api/dish/1
.
We opted to use plural as default because:
In the docs and in the tutorial blog it seems that the schema type is always set in plural. Also if you use
php artisan make:json-api:schema dish
it will create typedishes
.This causes every single item to be of a plural type. Like here, every single dish is of type
dishes
which does not sound convenient to me:In this Laravel JSON:API client package the type is put in singular.
Is there any special reason behind setting the type in plural?