I have created a custom API in magento2, but while hitting it through postman the response is "Request does not match any route" and trace:null
somebody help me please, I am new to Magento. Thanks in advance
My module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Emipro_Customapi" setup_version="1.0.0" active="true">
</module>
</config>
Webapi.xml
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd">
<route url="/V1/gethighlight/:sku" method="GET">
<service class="EmiproCustomapiApiGethighlight" method="gethighlightdata"/>
<resources>
<resource ref="admin"/>
</resources>
</route>
</routes>
di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="EmiproCustomapiApiGethighlight" type="EmiproCustomapiModelGethighlightdata" />
</config>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…