webapi.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
  9. <route method="GET" url="/V1/errortest/success">
  10. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="success" />
  11. <resources>
  12. <resource ref="Magento_TestModule3::resource1" />
  13. </resources>
  14. </route>
  15. <route method="GET" url="/V1/errortest/notfound">
  16. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="resourceNotFoundException" />
  17. <resources>
  18. <resource ref="Magento_TestModule3::resource1" />
  19. </resources>
  20. </route>
  21. <route method="GET" url="/V1/errortest/serviceexception">
  22. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="serviceException" />
  23. <resources>
  24. <resource ref="Magento_TestModule3::resource1" />
  25. </resources>
  26. </route>
  27. <route method="GET" url="/V1/errortest/unauthorized">
  28. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="authorizationException" />
  29. <resources>
  30. <resource ref="Magento_TestModule3::resource1" />
  31. <resource ref="Magento_TestModule3::resource2" />
  32. </resources>
  33. </route>
  34. <route method="GET" url="/V1/errortest/otherException">
  35. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="otherException" />
  36. <resources>
  37. <resource ref="Magento_TestModule3::resource1" />
  38. </resources>
  39. </route>
  40. <route method="GET" url="/V1/errortest/returnIncompatibleDataType">
  41. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="returnIncompatibleDataType" />
  42. <resources>
  43. <resource ref="Magento_TestModule3::resource1" />
  44. </resources>
  45. </route>
  46. <route method="GET" url="/V1/errortest/webapiException">
  47. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="webapiException" />
  48. <resources>
  49. <resource ref="Magento_TestModule3::resource1" />
  50. </resources>
  51. </route>
  52. <route method="POST" url="/V1/errortest/inputException">
  53. <service class="Magento\TestModule3\Service\V1\ErrorInterface" method="inputException" />
  54. <resources>
  55. <resource ref="Magento_TestModule3::resource1" />
  56. </resources>
  57. </route>
  58. </routes>