Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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">

<!-- Product Service -->
<route url="/V1/products" method="POST">
<service class="Magento\Catalog\Api\ProductRepositoryInterface" method="<caret>"/>
<resources>
<resource ref="Magento_Catalog::products" />
</resources>
</route>

</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

package com.magento.idea.magento2plugin.completion.xml;

public class PhpServiceMethodCompletionRegistrarTest extends CompletionXmlFixtureTestCase {

/**
* Tests for the completion in `method` attribute of the `service` tag in webapi.xml.
*/
public void testWebApiXmlMustHaveCompletion() {
final String filePath = this.getFixturePath("webapi.xml");
myFixture.configureByFile(filePath);

assertCompletionContains(filePath, "save");
}
}