- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022
02:57 AM
07-06-2022
02:57 AM
Failed to load API definition
I have this error when i try to test API using swagger. Can anybody help me
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022
10:10 PM
07-07-2022
10:10 PM
Re: Failed to load API definition
Simply you can look into the log in the Output window. The actual error can be seen there in my case, I missed adding HTTP action on top of a methods
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2022
03:34 AM
07-08-2022
03:34 AM
Re: Failed to load API definition
When we add phpdoc in API creation it adds like:
/**
* @param $orderId
* @param $mailId
* @return mixed
*/
You need to replace the above code with:
/**
* @param int $orderId
* @param mixed $mailId
* @return mixed
*/
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.
200+ Magento 2 Extensions for Enhanced Shopping Experience.