Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SalesRule legacy REST Api broken #5

Closed
romainruaud opened this issue Apr 18, 2019 · 2 comments
Closed

SalesRule legacy REST Api broken #5

romainruaud opened this issue Apr 18, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@romainruaud
Copy link
Contributor

I just noticed that when I process a REST Api query to rest/V1/salesRules/:ruleId I obtain the following result :

{
    "message": "Class \\Smile\\GiftSalesRule\\Api\\Data\\GiftRuleInterface[] does not exist",
    "code": -1,
    "trace": "#0 /var/www/magento/src/vendor/magento/framework/Reflection/MethodsMap.php(155): ReflectionClass->__construct('\\\\Smile\\\\GiftSale...')\n#1 /var/www/magento/src/vendor/magento/framework/Reflection/MethodsMap.php(106): Magento\\Framework\\Reflection\\MethodsMap->getMethodMapViaReflection('\\\\Smile\\\\GiftSale...')\n#2 /var/www/magento/src/vendor/magento/framework/Reflection/DataObjectProcessor.php(75): Magento\\Framework\\Reflection\\MethodsMap->getMethodsMap('\\\\Smile\\\\GiftSale...')\n#3 /var/www/magento/src/generated/code/Magento/Framework/Reflection/DataObjectProcessor/Proxy.php(95): Magento\\Framework\\Reflection\\DataObjectProcessor->buildOutputDataArray(Object(Smile\\GiftSalesRule\\Model\\GiftRule), '\\\\Smile\\\\GiftSale...')\n#4 /var/www/magento/src/vendor/magento/framework/Reflection/ExtensionAttributesProcessor.php(118): Magento\\Framework\\Reflection\\DataObjectProcessor\\Proxy->buildOutputDataArray(Object(Smile\\GiftSalesRule\\Model\\GiftRule), '\\\\Smile\\\\GiftSale...')\n#5 /var/www/magento/src/vendor/magento/framework/Reflection/DataObjectProcessor.php(101): Magento\\Framework\\Reflection\\ExtensionAttributesProcessor->buildOutputDataArray(Object(Magento\\SalesRule\\Api\\Data\\RuleExtension), '\\\\Magento\\\\SalesR...')\n#6 /var/www/magento/src/vendor/magento/framework/Webapi/ServiceOutputProcessor.php(109): Magento\\Framework\\Reflection\\DataObjectProcessor->buildOutputDataArray(Object(Magento\\SalesRule\\Model\\Data\\Rule), '\\\\Magento\\\\SalesR...')\n#7 /var/www/magento/src/vendor/magento/framework/Webapi/ServiceOutputProcessor.php(61): Magento\\Framework\\Webapi\\ServiceOutputProcessor->convertValue(Object(Magento\\SalesRule\\Model\\Data\\Rule), '\\\\Magento\\\\SalesR...')\n#8 /var/www/magento/src/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(99): Magento\\Framework\\Webapi\\ServiceOutputProcessor->process(Object(Magento\\SalesRule\\Model\\Data\\Rule), 'Magento\\\\SalesRu...', 'getById')\n#9 /var/www/magento/src/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#10 /var/www/magento/src/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#11 /var/www/magento/src/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#12 /var/www/magento/src/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#13 /var/www/magento/src/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins('dispatch', Array, Array)\n#14 /var/www/magento/src/vendor/magento/framework/App/Http.php(135): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#15 /var/www/magento/src/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\\Framework\\App\\Http->launch()\n#16 /var/www/magento/src/vendor/magento/framework/App/Bootstrap.php(258): Magento\\Framework\\App\\Http\\Interceptor->launch()\n#17 /var/www/magento/src/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#18 {main}"
}
@romainruaud romainruaud added the bug Something isn't working label Apr 18, 2019
maximequeneau added a commit to maximequeneau/magento2-module-gift-sales-rule that referenced this issue Jun 6, 2019
romainruaud added a commit that referenced this issue Jun 6, 2019
@maximequeneau
Copy link
Contributor

Fix by "commit [api] Issue #5 Fix rest call" (6e205f3)

@romainruaud
Copy link
Contributor Author

Closed by associated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants