-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
24e18e1
commit 546abbe
Showing
5 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
src/Umc/MagentoBundle/Resources/views/source/etc/webapi.xml.html.twig
This file contains 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,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?>{{ formatLicense(module, 'xml')|raw }} | ||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"> | ||
{% for entity in module.getEntities() %} | ||
<!-- {{ entity.getLabelSingular() }} --> | ||
<route url="/V1/{{ entity.getNameSingular()|camel }}/:{{ entity.getPk()|camel }}" method="GET"> | ||
<service class="{{ entity.getRepoInterface() }}" method="get"/> | ||
<resources> | ||
<resource ref="{{ entity.getAclName() }}"/> | ||
</resources> | ||
</route> | ||
<route url="/V1/{{ entity.getNameSingular()|camel }}/search" method="GET"> | ||
<service class="{{ entity.getListRepoInterface() }}" method="getList"/> | ||
<resources> | ||
<resource ref="{{ entity.getAclName() }}"/> | ||
</resources> | ||
</route> | ||
<route url="/V1/{{ entity.getNameSingular()|camel }}" method="POST"> | ||
<service class="{{ entity.getRepoInterface() }}" method="save"/> | ||
<resources> | ||
<resource ref="{{ entity.getAclName() }}"/> | ||
</resources> | ||
</route> | ||
<route url="/V1/{{ entity.getNameSingular()|camel }}/:{{ entity.getPk()|camel }}" method="PUT"> | ||
<service class="{{ entity.getRepoInterface() }}" method="save"/> | ||
<resources> | ||
<resource ref="{{ entity.getAclName() }}"/> | ||
</resources> | ||
</route> | ||
<route url="/V1/{{ entity.getNameSingular()|camel }}/:{{ entity.getPk()|camel }}" method="DELETE"> | ||
<service class="{{ entity.getRepoInterface() }}" method="deleteById"/> | ||
<resources> | ||
<resource ref="{{ entity.getAclName() }}"/> | ||
</resources> | ||
</route> | ||
{% endfor %} | ||
</routes> |