@@ -156,6 +156,8 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface
156
156
* @param \Magento\Framework\App\AreaList $areaList
157
157
* @param FieldsFilter $fieldsFilter
158
158
* @param ParamsOverrider $paramsOverrider
159
+ * @param ServiceOutputProcessor $serviceOutputProcessor
160
+ * @param Generator $swaggerGenerator ,
159
161
* @param StoreManagerInterface $storeManager
160
162
*
161
163
* TODO: Consider removal of warning suppression
@@ -196,6 +198,32 @@ public function __construct(
196
198
$ this ->requestProcessorPool = $ this ->_objectManager ->get (RequestProcessorPool::class);
197
199
}
198
200
201
+ /**
202
+ * Get deployment config
203
+ *
204
+ * @return DeploymentConfig
205
+ */
206
+ private function getDeploymentConfig ()
207
+ {
208
+ if (!$ this ->deploymentConfig instanceof \Magento \Framework \App \DeploymentConfig) {
209
+ $ this ->deploymentConfig = \Magento \Framework \App \ObjectManager::getInstance ()
210
+ ->get (\Magento \Framework \App \DeploymentConfig::class);
211
+ }
212
+ return $ this ->deploymentConfig ;
213
+ }
214
+
215
+ /**
216
+ * Set deployment config
217
+ *
218
+ * @param \Magento\Framework\App\DeploymentConfig $deploymentConfig
219
+ * @return void
220
+ * @deprecated 100.1.0
221
+ */
222
+ public function setDeploymentConfig (\Magento \Framework \App \DeploymentConfig $ deploymentConfig )
223
+ {
224
+ $ this ->deploymentConfig = $ deploymentConfig ;
225
+ }
226
+
199
227
/**
200
228
* Handle REST request
201
229
*
@@ -238,7 +266,7 @@ protected function isSchemaRequest()
238
266
*
239
267
* @return Route
240
268
* @deprecated 100.1.0
241
- * @see Magento\Webapi\Controller\Rest\InputParamsResolver::getRoute
269
+ * @see \ Magento\Webapi\Controller\Rest\InputParamsResolver::getRoute
242
270
*/
243
271
protected function getCurrentRoute ()
244
272
{
@@ -267,33 +295,10 @@ protected function checkPermissions()
267
295
}
268
296
}
269
297
270
- /**
271
- * Validate request
272
- *
273
- * @throws AuthorizationException
274
- * @throws \Magento\Framework\Webapi\Exception
275
- * @return void
276
- * @deprecated 100.1.0
277
- * @see Magento\Webapi\Controller\Rest\RequestValidator::validate
278
- */
279
- protected function validateRequest ()
280
- {
281
- $ this ->checkPermissions ();
282
- if ($ this ->getCurrentRoute ()->isSecure () && !$ this ->_request ->isSecure ()) {
283
- throw new \Magento \Framework \Webapi \Exception (__ ('Operation allowed only in HTTPS ' ));
284
- }
285
- if ($ this ->storeManager ->getStore ()->getCode () === Store::ADMIN_CODE
286
- && strtoupper ($ this ->_request ->getMethod ()) === RestRequest::HTTP_METHOD_GET
287
- ) {
288
- throw new \Magento \Framework \Webapi \Exception (__ ('Cannot perform GET operation with store code \'all \'' ));
289
- }
290
- }
291
-
292
298
/**
293
299
* Execute schema request
294
300
*
295
301
* @return void
296
- * @deprecated 100.1.0
297
302
*/
298
303
protected function processSchemaRequest ()
299
304
{
@@ -314,7 +319,6 @@ protected function processSchemaRequest()
314
319
* Execute API request
315
320
*
316
321
* @return void
317
- * @deprecated 100.1.0
318
322
* @throws AuthorizationException
319
323
* @throws \Magento\Framework\Exception\InputException
320
324
* @throws \Magento\Framework\Webapi\Exception
@@ -346,18 +350,40 @@ protected function processApiRequest()
346
350
}
347
351
348
352
/**
349
- * Get deployment config
353
+ * Validate request
350
354
*
351
- * @return DeploymentConfig
355
+ * @throws AuthorizationException
356
+ * @throws \Magento\Framework\Webapi\Exception
357
+ * @return void
352
358
* @deprecated 100.1.0
359
+ * @see \Magento\Webapi\Controller\Rest\RequestValidator::validate
353
360
*/
354
- private function getDeploymentConfig ()
361
+ protected function validateRequest ()
355
362
{
356
- if (!$ this ->deploymentConfig instanceof \Magento \Framework \App \DeploymentConfig) {
357
- $ this ->deploymentConfig = \Magento \Framework \App \ObjectManager::getInstance ()
358
- ->get (\Magento \Framework \App \DeploymentConfig::class);
363
+ $ this ->checkPermissions ();
364
+ if ($ this ->getCurrentRoute ()->isSecure () && !$ this ->_request ->isSecure ()) {
365
+ throw new \Magento \Framework \Webapi \Exception (__ ('Operation allowed only in HTTPS ' ));
366
+ }
367
+ if ($ this ->storeManager ->getStore ()->getCode () === Store::ADMIN_CODE
368
+ && strtoupper ($ this ->_request ->getMethod ()) === RestRequest::HTTP_METHOD_GET
369
+ ) {
370
+ throw new \Magento \Framework \Webapi \Exception (__ ('Cannot perform GET operation with store code \'all \'' ));
359
371
}
360
- return $ this ->deploymentConfig ;
361
372
}
362
373
374
+ /**
375
+ * The getter function to get InputParamsResolver object
376
+ *
377
+ * @return \Magento\Webapi\Controller\Rest\InputParamsResolver
378
+ *
379
+ * @deprecated 100.1.0
380
+ */
381
+ private function getInputParamsResolver ()
382
+ {
383
+ if ($ this ->inputParamsResolver === null ) {
384
+ $ this ->inputParamsResolver = \Magento \Framework \App \ObjectManager::getInstance ()
385
+ ->get (\Magento \Webapi \Controller \Rest \InputParamsResolver::class);
386
+ }
387
+ return $ this ->inputParamsResolver ;
388
+ }
363
389
}
0 commit comments