Magento – Failed to load API definition error in magento 2 swagger

magento2swaggerswaggerui

I am hitting magento 2 swagger UI but getting 500 error
Failed to load API definition

http://'website_name'.com/swagger/

Best Answer

Please check the network error in the browser if you have something like :

message: "The "array" class doesn't exist and the namespace must be specified. Verify and try again."

it can be related to this issue https://github.com/mundipagg/magento2/issues/137