Skip to content

Commit

Permalink
Uniformize shortName on all resources to group endpoints by domain
Browse files Browse the repository at this point in the history
  • Loading branch information
jolelievre committed Jan 20, 2025
1 parent ded06b3 commit 1992e94
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/ApiClient/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
use Symfony\Component\Validator\Constraints as Assert;

#[ApiResource(
shortName: 'ApiClient',
operations: [
new CQRSGet(
uriTemplate: '/api-client/{apiClientId}',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/ApiClient/ApiClientList.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\PaginatedList;

#[ApiResource(
shortName: 'ApiClient',
operations: [
new PaginatedList(
uriTemplate: '/api-clients',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Module/BulkModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\CQRSUpdate;

#[ApiResource(
shortName: 'Module',
operations: [
new CQRSUpdate(
uriTemplate: '/modules/toggle-status',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Module/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\PaginatedList;

#[ApiResource(
shortName: 'Module',
operations: [
new CQRSGet(
uriTemplate: '/module/{technicalName}',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Module/UninstallModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\CQRSUpdate;

#[ApiResource(
shortName: 'Module',
operations: [
new CQRSUpdate(
uriTemplate: '/module/{technicalName}/uninstall',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Module/UpgradeModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\CQRSUpdate;

#[ApiResource(
shortName: 'Module',
operations: [
new CQRSUpdate(
uriTemplate: '/module/{technicalName}/upgrade',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Module/UploadModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Symfony\Component\HttpFoundation\File\File;

#[ApiResource(
shortName: 'Module',
operations: [
new CQRSCreate(
uriTemplate: '/module/upload-source',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@

declare(strict_types=1);

namespace PrestaShop\Module\APIResources\ApiPlatform\Resources;
namespace PrestaShop\Module\APIResources\ApiPlatform\Resources\Product;

use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use PrestaShop\PrestaShop\Core\Domain\Product\Query\SearchProducts;
use PrestaShopBundle\ApiPlatform\Metadata\CQRSGetCollection;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSGetCollection(
uriTemplate: '/products/search/{phrase}/{resultsLimit}/{isoCode}',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/NewProductImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Symfony\Component\HttpFoundation\File\File;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSCreate(
uriTemplate: '/product/{productId}/image',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use Symfony\Component\HttpFoundation\Response;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSGet(
uriTemplate: '/product/{productId}',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/ProductImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSGet(
uriTemplate: '/product/image/{imageId}',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/ProductImageList.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use PrestaShopBundle\ApiPlatform\Metadata\LocalizedValue;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSGetCollection(
uriTemplate: '/product/{productId}/images',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/ProductList.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Symfony\Component\HttpFoundation\Response;

#[ApiResource(
shortName: 'Product',
operations: [
new PaginatedList(
uriTemplate: '/products',
Expand Down
1 change: 1 addition & 0 deletions src/ApiPlatform/Resources/Product/ProductShops.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Symfony\Component\HttpFoundation\Response;

#[ApiResource(
shortName: 'Product',
operations: [
new CQRSPartialUpdate(
uriTemplate: '/product/{productId}/shops',
Expand Down

0 comments on commit 1992e94

Please sign in to comment.