This repository was archived by the owner on May 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Change Webapi extension to use Inject Pool logic #1
Merged
Merged
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
066141b
Change Webapi extension to use Inject Pool login and configuration in…
nuzil 3137727
MBI-3 Modified Magento_Webapi module:
82a7783
MBI-3 Edited 'RestTest.php' test file in Magento_Webapi module: tempo…
f5b78dc
Clean the code
nuzil c09f916
Webapi and Swagger module changes for WebapiAsync PoC 0.0.1
4b58c8a
WebapiAsync new xsd attribute for handler which allow to pass service…
1a92d84
formating code to follow EcgM2,PSR2 standards
04847a2
formating code to follow EcgM2,PSR2 standards
b05d6a7
clean swagger async, updated rest Unit test, updated Restcontroller a…
3c8eea2
formating
707cc65
formating paddings
602e4e9
formating code to MEQP2 standard
0d612e7
mess code detector fixes
aa45d49
fix for undefined method Magento\Webapi\Controller\Rest\Router\Route:…
5d5d48d
Merge magento/bulk-api-ce#1.
vrann 01a87c2
Merge magento-partners/magento2ce/2.3-develop.
vrann fe992e3
Merge branch '2.3-develop' into async-webapi-1
vrann f8fced8
removed request_schema attribute added in previous commits
e736b7a
Testing of Travis automated tests execution
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Swagger\Block; | ||
|
||
use Magento\Framework\View\Element\Template; | ||
|
||
/** | ||
* Class Index | ||
* | ||
* @api | ||
*/ | ||
class Async extends Template | ||
{ | ||
/** | ||
* @return mixed|string | ||
*/ | ||
private function getParamStore() | ||
{ | ||
return ($this->getRequest()->getParam('store')) ? $this->getRequest()->getParam('store') : 'all'; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getSchemaUrl() | ||
{ | ||
return rtrim($this->getBaseUrl(), '/') . '/rest/' . $this->getParamStore() . '/async/schema?services=all'; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/*** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extra asterisk should be removed. |
||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Swagger\Controller\Async; | ||
|
||
/** | ||
* Class Index | ||
* @package Magento\Swagger\Controller\Index | ||
*/ | ||
class Index extends \Magento\Framework\App\Action\Action | ||
{ | ||
/** | ||
* @var \Magento\Framework\View\Page\Config | ||
*/ | ||
private $pageConfig; | ||
|
||
/** | ||
* @var \Magento\Framework\View\Result\PageFactory | ||
*/ | ||
private $pageFactory; | ||
|
||
/** | ||
* @param \Magento\Framework\App\Action\Context $context | ||
* @param \Magento\Framework\View\Page\Config $pageConfig | ||
* @param \Magento\Framework\View\Result\PageFactory $pageFactory | ||
*/ | ||
public function __construct( | ||
\Magento\Framework\App\Action\Context $context, | ||
\Magento\Framework\View\Page\Config $pageConfig, | ||
\Magento\Framework\View\Result\PageFactory $pageFactory | ||
) { | ||
parent::__construct($context); | ||
$this->pageConfig = $pageConfig; | ||
$this->pageFactory = $pageFactory; | ||
} | ||
|
||
/** | ||
* @return \Magento\Framework\View\Result\Page | ||
*/ | ||
public function execute() | ||
{ | ||
$this->pageConfig->addBodyClass('swagger-section'); | ||
return $this->pageFactory->create(); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
app/code/Magento/Swagger/view/frontend/layout/swagger_async_index.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="qwerty"> | ||
<head> | ||
<title>Swagger UI Async</title> | ||
|
||
<!--<title>Swagger UI assets</title>--> | ||
<css src='Magento_Swagger::swagger-ui/css/typography.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<css src='Magento_Swagger::swagger-ui/css/reset.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<css src='Magento_Swagger::swagger-ui/css/screen.css' media='screen' rel='stylesheet' type='text/css'/> | ||
<css src='Magento_Swagger::swagger-ui/css/reset.css' media='print' rel='stylesheet' type='text/css'/> | ||
<css src='Magento_Swagger::swagger-ui/css/print.css' media='print' rel='stylesheet' type='text/css'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/jquery-1.8.0.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/jquery.slideto.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/jquery.wiggle.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/jquery.ba-bbq.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/handlebars.min-v4.0.10.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/underscore-min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/backbone-min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/jsoneditor.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/swagger-ui.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/highlight.9.1.0.pack.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/highlight.9.1.0.pack_extended.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/lodash.min.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/object-assign-pollyfill.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/marked.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lib/swagger-oauth.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lang/translator.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lang/ru.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/lang/en.js' type='text/javascript'/> | ||
<link src='Magento_Swagger::swagger-ui/js/magento-swagger.js' type='text/javascript'/> | ||
|
||
<!--Remove require-js assets--> | ||
<remove src="requirejs/require.js"/> | ||
<remove src="mage/requirejs/mixins.js"/> | ||
<remove src="requirejs-config.js"/> | ||
</head> | ||
<body> | ||
<!--Remove Magento page content--> | ||
<referenceContainer name="page.wrapper" remove="true"/> | ||
<referenceBlock name="requirejs-config" remove="true"/> | ||
<referenceContainer name="root"> | ||
<block name="swaggerUiContent" class="Magento\Swagger\Block\Async" template="Magento_Swagger::swagger-ui/index.phtml"/> | ||
</referenceContainer> | ||
</body> | ||
</page> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add meaningful descriptions to all new classes and methods in the CR.