doofinder / doofinder-magento2

Open Software License 3.0
10 stars 9 forks source link

V 0.14 break swagger #340

Open nenes25 opened 2 months ago

nenes25 commented 2 months ago

Hello,

The module in version 0.14.x breaks the local swagger which is really useful for testing Api locally

Step to reproduce :

You will see the following error : image And we get get this error message : "message":"The \"array\" class doesn't exist and the namespace must be specified. Verify and try again.", This is related to the new api : Api/SingleScriptInterface.php and Api/ModuleDataInterface.php which typehints array as return values which is not valid ( see : https://magento.stackexchange.com/questions/231741/magento-2-webapi-gives-error-class-array-does-not-exist ) A quick fix is to change this return type to an array of strings string[] which will fix the issue.
( Faulty commit is here : https://github.com/doofinder/doofinder-magento2/commit/b008e53ccba253ed3c9bf007921d2d4e6b4ecd8c )

Regards,