This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Swagger \Block ;
7
+
8
+ use Magento \Framework \View \Element \Template ;
9
+
10
+ /**
11
+ * Class Index
12
+ *
13
+ * @package Magento\Swagger\Block
14
+ */
15
+ class Index extends Template
16
+ {
17
+ /**
18
+ * @return mixed|string
19
+ */
20
+ private function getParamStore ()
21
+ {
22
+ return ($ this ->getRequest ()->getParam ('store ' )) ? $ this ->getRequest ()->getParam ('store ' ) : 'all ' ;
23
+ }
24
+
25
+ /**
26
+ * @return string
27
+ */
28
+ public function getSchemaUrl ()
29
+ {
30
+ return rtrim ($ this ->getBaseUrl (), '/ ' ) . '/rest/ ' . $ this ->getParamStore () . '/schema?services=all ' ;
31
+ }
32
+ }
Original file line number Diff line number Diff line change 45
45
<referenceContainer name =" page.wrapper" remove =" true" />
46
46
<referenceBlock name =" requirejs-config" remove =" true" />
47
47
<referenceContainer name =" root" >
48
- <block name =" swaggerUiContent" class =" Magento\Framework\View\Element\Template " template =" Magento_Swagger::swagger-ui/index.phtml" />
48
+ <block name =" swaggerUiContent" class =" Magento\Swagger\Block\Index " template =" Magento_Swagger::swagger-ui/index.phtml" />
49
49
</referenceContainer >
50
50
</body >
51
51
</page >
Original file line number Diff line number Diff line change 14
14
15
15
/** @var \Magento\Framework\View\Element\Template $block */
16
16
17
- $ schemaUrl = rtrim ( $ block ->getBaseUrl (), ' / ' ) . ' /rest/all/schema?services=all ' ;
17
+ $ schemaUrl = $ block ->getSchemaUrl () ;
18
18
?>
19
19
20
20
<div id='header'>
You can’t perform that action at this time.
0 commit comments