What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all π Which entry point is responsible for the Zed Api? backend-gateway, ba
Hi all π Which entry point is responsible for the Zed Api? backend-gateway, backend-api or backoffice? I am currently getting no result via one of the entry points. Just a No route found for "GET /api/rest/order-reference" error message. The documentation and the b2c shops are not really helpful -> https://docs.spryker.com/docs/scos/dev/sdk/zed-api/zed-api-project-implementation.html.
Comments
-
What you mean with Zed API? This one? https://github.com/spryker/api
0 -
Yes
0 -
yeah this handles /api/rest/.... But /api/rest/order-reference is custom, right?
0 -
yes, you are right. It's a custom endpoint for the api
0 -
And whats the problem/question?
0 -
We are in the process of setting up the Glue Api and installing the first endpoints. Before we started with that, we only had one entry point for the backend. Just like in the old DemoShop (https://github.com/spryker/demoshop/tree/master/public/Zed). Due to the Glue Api we had to set up the other endpoints (backend-api, backend-gateway and backoffice). In addition to this we use the Zed Api. Unfortunately, after switching to the separate endpoints, the requests to the Zed Api no longer go through successfully. I only get a: "No route found for "GET /api/rest/order-reference" error message. I have integrated everything as described in the documentation. Unfortunately without success.
0 -
An example of an ApplicationDependencyProvider.php including a configured Zed Api would be helpful. Maybe is miss something but everything is set up as described in the documentation
0 -
We use glue and we use the zed api in our project too. But we are not using backoffice at the moment. Did you register everything properly and clear cache and run router:cache:warm-up?
0 -
<?php namespace Pyz\Zed\Application; use Spryker\Zed\Application\ApplicationDependencyProvider as SprykerApplicationDependencyProvider; use Spryker\Zed\ErrorHandler\Communication\Plugin\Application\ErrorHandlerApplicationPlugin; use Spryker\Zed\EventDispatcher\Communication\Plugin\Application\EventDispatcherApplicationPlugin; use Spryker\Zed\Form\Communication\Plugin\Application\FormApplicationPlugin; use Spryker\Zed\GuiTable\Communication\Plugin\Application\GuiTableApplicationPlugin; use Spryker\Zed\Http\Communication\Plugin\Application\HttpApplicationPlugin; use Spryker\Zed\Locale\Communication\Plugin\Application\LocaleApplicationPlugin; use Spryker\Zed\Messenger\Communication\Plugin\Application\MessengerApplicationPlugin; use Spryker\Zed\Propel\Communication\Plugin\Application\PropelApplicationPlugin; use Spryker\Zed\Router\Communication\Plugin\Application\RouterApplicationPlugin; use Spryker\Zed\Session\Communication\Plugin\Application\SessionApplicationPlugin; use Spryker\Zed\Translator\Communication\Plugin\Application\TranslatorApplicationPlugin; use Spryker\Zed\Twig\Communication\Plugin\Application\TwigApplicationPlugin; use Spryker\Zed\Validator\Communication\Plugin\Application\ValidatorApplicationPlugin; use Spryker\Zed\WebProfiler\Communication\Plugin\Application\WebProfilerApplicationPlugin; class ApplicationDependencyProvider extends SprykerApplicationDependencyProvider { /** * @return \Spryker\Shared\ApplicationExtension\Dependency\Plugin\ApplicationPluginInterface[] */ protected function getApplicationPlugins(): array { $applicationPlugins = [ new SessionApplicationPlugin(), new TwigApplicationPlugin(), new EventDispatcherApplicationPlugin(), new LocaleApplicationPlugin(), new TranslatorApplicationPlugin(), new MessengerApplicationPlugin(), new PropelApplicationPlugin(), new RouterApplicationPlugin(), new HttpApplicationPlugin(), new ErrorHandlerApplicationPlugin(), new FormApplicationPlugin(), new ValidatorApplicationPlugin(), new GuiTableApplicationPlugin(), ]; if (class_exists(WebProfilerApplicationPlugin::class)) { $applicationPlugins[] = new WebProfilerApplicationPlugin(); } return $applicationPlugins; } }
0 -
<?php namespace Pyz\Zed\Application; use FondOfSpryker\Zed\ApiAuth\Communication\Plugin\Bootstrap\ApiAuthBootstrapProvider; use FondOfSpryker\Zed\Contentful\Communication\Plugin\ContentfulTwigServiceProvider; use Silex\Provider\ServiceControllerServiceProvider; use Spryker\Shared\ErrorHandler\Plugin\ServiceProvider\WhoopsErrorHandlerServiceProvider; use Spryker\Zed\Api\Communication\Plugin\ApiServiceProviderPlugin; use Spryker\Zed\Api\Communication\Plugin\ServiceProvider\ApiRoutingServiceProvider; use Spryker\Zed\Application\ApplicationDependencyProvider as SprykerApplicationDependencyProvider; use Spryker\Zed\Application\Communication\Plugin\ServiceProvider\RequestServiceProvider; use Spryker\Zed\Application\Communication\Plugin\ServiceProvider\RoutingServiceProvider; use Spryker\Zed\Application\Communication\Plugin\ServiceProvider\SslServiceProvider; use Spryker\Zed\ErrorHandler\Communication\Plugin\Application\ErrorHandlerApplicationPlugin; use Spryker\Zed\EventBehavior\Communication\Plugin\ServiceProvider\EventBehaviorServiceProvider; use Spryker\Zed\EventDispatcher\Communication\Plugin\Application\EventDispatcherApplicationPlugin; use Spryker\Zed\Form\Communication\Plugin\Application\FormApplicationPlugin; use Spryker\Zed\Http\Communication\Plugin\Application\HttpApplicationPlugin; use Spryker\Zed\Kernel\Container; use Spryker\Zed\Locale\Communication\Plugin\Application\LocaleApplicationPlugin; use Spryker\Zed\Messenger\Communication\Plugin\Application\MessengerApplicationPlugin; use Spryker\Zed\Propel\Communication\Plugin\Application\PropelApplicationPlugin; use Spryker\Zed\Propel\Communication\Plugin\ServiceProvider\PropelServiceProvider; use Spryker\Zed\Router\Communication\Plugin\Application\RouterApplicationPlugin; use Spryker\Zed\Session\Communication\Plugin\Application\SessionApplicationPlugin; use Spryker\Zed\Translator\Communication\Plugin\Application\TranslatorApplicationPlugin; use Spryker\Zed\Twig\Communication\Plugin\Application\TwigApplicationPlugin; use Spryker\Zed\Validator\Communication\Plugin\Application\ValidatorApplicationPlugin; use Spryker\Zed\WebProfiler\Communication\Plugin\Application\WebProfilerApplicationPlugin; class ApplicationDependencyProvider extends SprykerApplicationDependencyProvider { protected const DEVELOPMENT_ENVIRONMENT = 'development'; /** * @return \Spryker\Shared\ApplicationExtension\Dependency\Plugin\ApplicationPluginInterface[] */ protected function getApplicationPlugins(): array { $dev = []; if (APPLICATION_ENV === 'development' && class_exists('WebProfilerApplicationPlugin')) { $dev = [ new WebProfilerApplicationPlugin(), ]; } return array_merge( [ new TwigApplicationPlugin(), new EventDispatcherApplicationPlugin(), new LocaleApplicationPlugin(), new TranslatorApplicationPlugin(), new MessengerApplicationPlugin(), new PropelApplicationPlugin(), new RouterApplicationPlugin(), new HttpApplicationPlugin(), new SessionApplicationPlugin(), new ErrorHandlerApplicationPlugin(), new FormApplicationPlugin(), new ValidatorApplicationPlugin(), ], $dev ); } /** * @param \Spryker\Zed\Kernel\Container $container * * @return \Silex\ServiceProviderInterface[] */ protected function getServiceProviders(Container $container): array { $serviceProviders = parent::getServiceProviders($container); $serviceProviders[] = new ContentfulTwigServiceProvider(); return $serviceProviders; } /** * The ZED Api layer was discontinued but will remain maintained * Usage will continue until full replacement * * @param \Spryker\Zed\Kernel\Container $container * * @return \Silex\ServiceProviderInterface[] */ protected function getApiServiceProviders(Container $container) { $providers = [ new RequestServiceProvider(), new SslServiceProvider(), new ServiceControllerServiceProvider(), new RoutingServiceProvider(), new ApiServiceProviderPlugin(), new ApiRoutingServiceProvider(), new PropelServiceProvider(), new EventBehaviorServiceProvider(), new ApiAuthBootstrapProvider(), ]; if (APPLICATION_ENV === static::DEVELOPMENT_ENVIRONMENT) { $providers[] = new WhoopsErrorHandlerServiceProvider(); } return $providers; } }
0 -
Dunno if this will help you
0 -
Thank you for the examples π
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random