Closed MarcusWolschon closed 5 years ago
Which Magento version do you use?
This would be a nightmare if true for 2.3 as there would be no workaround on 2.3 as 0.10.0 is the only 2.3 compatible version. We did not yet implement the DHL plug-in as we are first finishing API connections on our new 2.3 development site. As we do have external order and product data processing, a Magento without APIs would be a 100% broken shop for us. Btw. there would not even be any visible front-end if someone already uses PWA as these rely on API connection to the shop for getting their content (we still use theme but some first stores are starting to use PWAs). APIs are a core functionality in Magento 2 going forward, not something only few used like in M1.
@MarcusWolschon Thank you very much for reporting this! We will look into it ASAP.
@MarcusWolschon To better understand the impact of this issue: Is it actually the REST APIs which are broken or is it limited to the schema generation? Thanks.
Mandrino: I am using Magento 2.2.6 and my description included a workaround unless you need to use the specific DHL interfaces using REST or SOAP.
I am using the SOAP API. That's where it happened when calling endpoints with code generated from an existing Schema. As written in the reproduction steps, I was able to reproduct it with Swagger using the REST API.
Quick summary The actual REST and SOAP APIs are not broken. If that were the case, the Magento checkout wouldn't work at all, because it relies on REST APIs.
What is broken though is the schema generation, which is indeed a problem. One of the interfaces transported over the web API was annotated via import, not with full namespace, which cannot be handled by Magento's web API mechanism.
What happens next? We are working on the fix and will push it here ASAP. If nothing goes wrong: within the next few days. The fix also requires an update in the lib-shipping-mx which we are going to push at the same time.
The new version 0.10.1 has just been released, together with an updated lib-shipping-mx.
@MarcusWolschon Can you confirm that all is well with the world now?
Yes, it works
tested:
Bug description
After upgrading from the 0.9.x release to 0.10.0 all SOAP and REST APIs are broken. Removing the /vendor/dhl/module-shipping-m2/etc/webapi.xml file solves the problem as a temporary workaround. (Update: That workaround may break the checkout process. Not confirmed yet.)
Steps to reproduce To reproduce the problem:
Expected behavior swagger opens and presents the APIs available to the given api key or the anonymous user
Screenshots / logs instead var/log/exceptions.log shows this: [2019-03-09 16:43:48] main.CRITICAL: Report ID: webapi-5c83ed448f3c4; Message: Class "ServiceInputInterface[]" does not exist. Please note that namespace must be specified. {"exception":"[object] (Exception(code: 0): Report ID: webapi-5c83ed448f3c4; Message: Class "ServiceInputInterface[]" does not exist. Please note that namespace must be specified. at /vendor/magento/framework/Webapi/ErrorProcessor.php:205, LogicException(code: 0): Class "ServiceInputInterface[]" does not exist. Please note that namespace must be specified. at /vendor/magento/framework/Reflection/TypeProcessor.php:140)"} []
The cause seems to be the Dhl\Shipping\Api\Data\Service\ServiceInputInterface class that belongs to dhl-lib-shipping-mx
Environment
FAQ Has the Knowledge Base been checked for a solution?