Migrate ProductOfferServicePointAvailabilitiesRestApi to API Platform
Edit on GitHubThis document describes how to migrate the ProductOfferServicePointAvailabilitiesRestApi Glue module to the API Platform ProductOfferServicePointAvailability module.
Prerequisites
Complete the cross-cutting changes described in Migrate Glue REST API to API Platform before proceeding.
Overview
The ProductOfferServicePointAvailabilitiesRestApi module provided the following storefront endpoint:
| Endpoint | Operation | Old plugin |
|---|---|---|
POST /product-offer-service-point-availabilities |
Check product offer availability at service points | ProductOfferServicePointAvailabilitiesResourceRoutePlugin |
This is now served by the API Platform ProductOfferServicePointAvailability module.
1. Update module dependencies
composer require spryker/product-offer-service-point-availability:"^X.Y.Z"
Use the version that includes the API Platform resources. Check the module changelog for the exact version.
2. Remove route plugin from GlueApplicationDependencyProvider
In src/Pyz/Glue/GlueApplication/GlueApplicationDependencyProvider.php, remove the following plugin from getResourceRoutePlugins():
| Plugin to remove | Fully qualified class name |
|---|---|
ProductOfferServicePointAvailabilitiesResourceRoutePlugin |
Spryker\Glue\ProductOfferServicePointAvailabilitiesRestApi\Plugin\GlueApplication\ProductOfferServicePointAvailabilitiesResourceRoutePlugin |
3. Regenerate transfers and API resources
docker/sdk cli console transfer:generate
docker/sdk cli glue api:generate
docker/sdk cli glue cache:clear
Relationship plugin status
The ProductOfferServicePointAvailabilitiesRestApi module did not register any relationship plugins. No relationship changes are needed.
Thank you!
For submitting the form