Paazl / magento2-checkout-widget

6 stars 15 forks source link

Module breaks Rest schema / Swagger #60

Closed ericclaeren closed 3 years ago

ericclaeren commented 3 years ago

After updating to 1.6.0 to fix the previous swagger issue #55 it still seems to break.

After checking: /rest/all/schema?services=all, that returns the follow message" The "CheckQuoteResultInterface" class doesn't exist and the namespace must be specified. Verify and try again.

I'm getting this issue on Magento 2.3.5-p1 enterprise.

The docs say the following:

Valid object types include a fully qualified class name or a fully qualified interface name.

Cheers, Eric

ericclaeren commented 3 years ago

A quick test:

Seems that changing the return type from: @return CheckQuoteResultInterface

To @return \Paazl\CheckoutWidget\Api\Data\CheckQuoteResultInterface

Fixes the issue.

Unrelated question, why is the module declaring strict_types while not actually using typehint/return types?

Frank-Magmodules commented 3 years ago

HI @ericclaeren, We are happy to share that we've just released the new 1.6.1 version where your PR has been merged. This indeed fixes the issue, thank you for your contribution to this. We are closing this issue now but please feel free to reopen the issue if this still occurs.