This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,43 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestModule2\Service\V1\Entity;
class Item extends \Magento\Framework\Api\AbstractExtensibleObject
{
/**
* @return int
*/
public function getId()
{
return $this->_data['id'];
}
/**
* @param int $id
* @return $this
*/
public function setId($id)
{
return $this->setData('id', $id);
}
/**
* @return string
*/
public function getName()
{
return $this->_data['name'];
}
/**
* @param string $name
* @return $this
*/
public function setName($name)
{
return $this->setData('name', $name);
}
}
@@ -0,0 +1,61 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestModule2\Service\V1;
use Magento\TestModule2\Service\V1\Entity\Item;
use Magento\TestModule2\Service\V1\Entity\ItemFactory;
class NoWebApiXml implements \Magento\TestModule2\Service\V1\NoWebApiXmlInterface
{
/**
* @var ItemFactory
*/
protected $itemFactory;
/**
* @param ItemFactory $itemFactory
*/
public function __construct(ItemFactory $itemFactory)
{
$this->itemFactory = $itemFactory;
}
/**
* {@inheritdoc}
*/
public function item($id)
{
return $this->itemFactory->create()->setId($id)->setName('testProduct1');
}
/**
* {@inheritdoc}
*/
public function items()
{
$result1 = $this->itemFactory->create()->setId(1)->setName('testProduct1');
$result2 = $this->itemFactory->create()->setId(2)->setName('testProduct2');
return [$result1, $result2];
}
/**
* {@inheritdoc}
*/
public function create($name)
{
return $this->itemFactory->create()->setId(rand())->setName($name);
}
/**
* {@inheritdoc}
*/
public function update(Item $item)
{
return $this->itemFactory->create()->setId($item->getId())->setName('Updated' . $item->getName());
}
}
@@ -0,0 +1,42 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestModule2\Service\V1;
use Magento\TestModule2\Service\V1\Entity\Item;
interface NoWebApiXmlInterface
{
/**
* Get an item.
*
* @param int $id
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function item($id);
/**
* Create an item.
*
* @param string $name
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function create($name);
/**
* Update an item.
*
* @param \Magento\TestModule2\Service\V1\Entity\Item $item
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function update(Item $item);
/**
* Retrieve a list of items.
*
* @return \Magento\TestModule2\Service\V1\Entity\Item[]
*/
public function items();
}
@@ -0,0 +1,69 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestModule2\Service\V1;
use Magento\TestModule2\Service\V1\Entity\Item;
use Magento\TestModule2\Service\V1\Entity\ItemFactory;
class SubsetRest implements \Magento\TestModule2\Service\V1\SubsetRestInterface
{
/**
* @var ItemFactory
*/
protected $itemFactory;
/**
* @param ItemFactory $itemFactory
*/
public function __construct(ItemFactory $itemFactory)
{
$this->itemFactory = $itemFactory;
}
/**
* {@inheritdoc}
*/
public function item($id)
{
return $this->itemFactory->create()->setId($id)->setName('testItem' . $id);
}
/**
* {@inheritdoc}
*/
public function items()
{
$result1 = $this->itemFactory->create()->setId(1)->setName('testItem1');
$result2 = $this->itemFactory->create()->setId(2)->setName('testItem2');
return [$result1, $result2];
}
/**
* {@inheritdoc}
*/
public function create($name)
{
return $this->itemFactory->create()->setId(rand())->setName($name);
}
/**
* {@inheritdoc}
*/
public function update(Item $item)
{
return $this->itemFactory->create()->setId($item->getId())->setName('Updated' . $item->getName());
}
/**
* {@inheritdoc}
*/
public function remove($id)
{
return $this->itemFactory->create()->setId(1);
}
}
@@ -0,0 +1,50 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestModule2\Service\V1;
use Magento\TestModule2\Service\V1\Entity\Item;
interface SubsetRestInterface
{
/**
* Return a single item.
*
* @param int $id
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function item($id);
/**
* Return multiple items.
*
* @return \Magento\TestModule2\Service\V1\Entity\Item[]
*/
public function items();
/**
* Create an item.
*
* @param string $name
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function create($name);
/**
* Update an item.
*
* @param \Magento\TestModule2\Service\V1\Entity\Item $item
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function update(Item $item);
/**
* Delete an item.
*
* @param int $id
* @return \Magento\TestModule2\Service\V1\Entity\Item
*/
public function remove($id);
}
@@ -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_TestModule2::all" title="TestModule2" sortOrder="1">
<resource id="Magento_TestModule2::resource1" title="Resource1" sortOrder="20"/>
<resource id="Magento_TestModule2::resource2" title="Resource2" sortOrder="10"/>
<resource id="Magento_TestModule2::resource3" title="Resource3" sortOrder="30"/>
</resource>
</resource>
</resources>
</acl>
</config>
@@ -0,0 +1,11 @@
<?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\TestModule2\Service\V1\SubsetRestInterface" type="Magento\TestModule2\Service\V1\SubsetRest" />
<preference for="Magento\TestModule2\Service\V1\NoWebApiXmlInterface" type="Magento\TestModule2\Service\V1\NoWebApiXml" />
</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_TestModule2" />
</config>
@@ -0,0 +1,240 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ItemRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Item call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray"
type="ItemsArray">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsArray">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Create call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Update call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Remove call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
@@ -0,0 +1,240 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ItemRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Item call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray"
type="ItemsArray">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsArray">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Create call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Update call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Remove call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
@@ -0,0 +1,240 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="ItemRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Item call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray"
type="ItemsArray">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ItemsArray">
<xsd:annotation>
<xsd:documentation>Response container for the Items call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Items</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Item</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CreateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Create call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Create</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UpdateResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Update call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Update</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveRequest">
<xsd:annotation>
<xsd:documentation/>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:int">
<xsd:annotation>
<xsd:documentation>Entity ID</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:min/>
<inf:max/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:requiredInput>Yes</inf:requiredInput>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="RemoveResponse">
<xsd:annotation>
<xsd:documentation>Response container for the Remove call.</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap"/>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Default label</xsd:documentation>
<xsd:appinfo xmlns:inf="http://magento.ll/webapi/soap">
<inf:maxLength/>
<inf:callInfo>
<inf:callName>Remove</inf:callName>
<inf:returned>Always</inf:returned>
</inf:callInfo>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
@@ -0,0 +1,22 @@
<?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/testModule2SubsetRest/:id">
<service class="Magento\TestModule2\Service\V1\SubsetRestInterface" method="item" />
<resources>
<resource ref="Magento_TestModule2::resource1" />
</resources>
</route>
<route method="GET" url="/V1/testModule2SubsetRest">
<service class="Magento\TestModule2\Service\V1\SubsetRestInterface" method="items" />
<resources>
<resource ref="Magento_TestModule2::resource2" />
<resource ref="Magento_TestModule2::resource3" />
</resources>
</route>
</routes>
@@ -0,0 +1,12 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\Component\ComponentRegistrar;
$registrar = new ComponentRegistrar();
if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModule2') === null) {
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModule2', __DIR__);
}