7 declare(strict_types=1);
27 private $swaggerGenerator;
35 private $processorPath;
47 $processorPath = self::PROCESSOR_PATH
49 $this->swaggerGenerator = $swaggerGenerator;
51 $this->processorPath = $processorPath;
59 $requestedServices =
$request->getRequestedServices(
'all');
61 ? $this->swaggerGenerator->getListOfServices()
63 $responseBody = $this->swaggerGenerator->generate(
69 $this->response->setBody($responseBody)->setHeader(
'Content-Type',
'application/json');
77 if (strpos(ltrim(
$request->getPathInfo(),
'/'), $this->processorPath) === 0) {
89 if (strpos(ltrim(
$request->getPathInfo(),
'/'), self::BULK_PROCESSOR_PATH) === 0) {
canProcess(\Magento\Framework\Webapi\Rest\Request $request)
isBulk(\Magento\Framework\Webapi\Rest\Request $request)
__construct(Generator $swaggerGenerator, RestResponse $response, $processorPath=self::PROCESSOR_PATH)
process(\Magento\Framework\Webapi\Rest\Request $request)
const BULK_PROCESSOR_PATH