init
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Magento_TestModule1::all" title="TestModule1" sortOrder="1">
|
||||
<resource id="Magento_TestModule1::resource1" title="Resource1" sortOrder="20"/>
|
||||
<resource id="Magento_TestModule1::resource2" title="Resource2" sortOrder="10"/>
|
||||
<resource id="Magento_TestModule1::resource3" title="Resource3" sortOrder="30"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
|
||||
<default>
|
||||
<oauth>
|
||||
<consumer>
|
||||
<enable_integration_as_bearer>1</enable_integration_as_bearer>
|
||||
</consumer>
|
||||
</oauth>
|
||||
</default>
|
||||
</config>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<preference for="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" type="Magento\TestModule1\Service\V1\AllSoapAndRest" />
|
||||
<preference for="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" type="Magento\TestModule1\Service\V2\AllSoapAndRest" />
|
||||
|
||||
<virtualType name="Magento\TestModule1\Service\Config\TestModule1MetadataConfig" type="Magento\Framework\Api\ExtensionAttribute\Config\MetadataConfig">
|
||||
<arguments>
|
||||
<argument name="attributeMetadataBuilder" xsi:type="object">Magento\TestModuleMSC\Model\Data\Eav\AttributeMetadataBuilder</argument>
|
||||
<argument name="dataObjectClassName" xsi:type="string">Magento\TestModule1\Service\V1\Entity\Item</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Magento\TestModule1\Service\V1\Entity\ItemBuilder">
|
||||
<arguments>
|
||||
<argument name="metadataService" xsi:type="object">Magento\TestModule1\Service\Config\TestModule1MetadataConfig</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
</config>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
|
||||
<extension_attributes for="Magento\TestModule1\Service\V1\Entity\Item">
|
||||
<attribute code="custom_attribute_data_object" type="Magento\TestModuleMSC\Model\Data\CustomAttributeDataObject" />
|
||||
<attribute code="custom_attribute_string" type="string" />
|
||||
</extension_attributes>
|
||||
<extension_attributes for="Magento\TestModuleMSC\Model\Data\CustomAttributeDataObject">
|
||||
<attribute code="custom_attribute_nested" type="Magento\TestModuleMSC\Model\Data\CustomAttributeNestedDataObject" />
|
||||
<attribute code="custom_attribute_int" type="int" />
|
||||
</extension_attributes>
|
||||
</config>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
|
||||
<router id="standard">
|
||||
<route id="testmoduleone" frontName="testmoduleone">
|
||||
<module name="Magento_TestModule1" />
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Magento_TestModule1" />
|
||||
</config>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
|
||||
|
||||
<route method="GET" url="/V1/testmodule1/overwritten">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="item" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
</resources>
|
||||
<data>
|
||||
<parameter name="itemId" force="true">-55</parameter>
|
||||
</data>
|
||||
</route>
|
||||
|
||||
<route method="POST" url="/V1/testmodule1/testOptionalParam">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="testOptionalParam" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
</resources>
|
||||
<data>
|
||||
<parameter name="name">Default Name</parameter>
|
||||
</data>
|
||||
</route>
|
||||
|
||||
<route method="GET" url="/V1/testmodule1/:itemId">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="item" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="GET" url="/V1/testmodule1">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="items" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="POST" url="/V1/testmodule1">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="create" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource3" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="PUT" url="/V1/testmodule1/:itemId">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="update" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="GET" url="/V1/testmodule1/resource1/:itemId">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="item" />
|
||||
<resources>
|
||||
<resource ref="anonymous" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="POST" url="/V1/testmodule1/itemAnyType">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="itemAnyType" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="GET" url="/V1/testmodule1/itemPreconfigured">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="getPreconfiguredItem" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="PUT" url="/V1/testmodule1/withParam">
|
||||
<service class="Magento\TestModule1\Service\V1\AllSoapAndRestInterface" method="update" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
<data>
|
||||
<parameter name="paramId" force="true">%param_id%</parameter>
|
||||
</data>
|
||||
</route>
|
||||
<route method="GET" url="/V2/testmodule1/:id">
|
||||
<service class="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" method="item" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="GET" url="/V2/testmodule1">
|
||||
<service class="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" method="items" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="POST" url="/V2/testmodule1">
|
||||
<service class="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" method="create" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource3" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="PUT" url="/V2/testmodule1/:id">
|
||||
<service class="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" method="update" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
<resource ref="Magento_TestModule1::resource2" />
|
||||
</resources>
|
||||
</route>
|
||||
<route method="DELETE" url="/V2/testmodule1/:id">
|
||||
<service class="Magento\TestModule1\Service\V2\AllSoapAndRestInterface" method="delete" />
|
||||
<resources>
|
||||
<resource ref="Magento_TestModule1::resource1" />
|
||||
</resources>
|
||||
</route>
|
||||
</routes>
|
||||
Reference in New Issue
Block a user