I had updated the Magento 2.3.5 to Magento 2.4.2 the my Swagger is not working i shows the Empty page. The console shows some error and there is a syntax error in swagger like it is showing but i had checked the code is proper in file Can anyone suggest why it is happening. enter image description here

enter image description here

enter image description here

I had found this if enable these below options the swagger is not working. enter image description here

2 Answers 2


I was with the same issue.

This occurs by a conflict between the javascript files the theme and the files from swagger when it are merged.

To resolve this, you should go to: Stores > Settings > Configuration > Advanced > Developer

In JavaScript Settings change Merge JavaScript Files from Yes to No.

I hope that it help you.

enter image description here


You need to pass admin token in the api_key field.

Generate admin token

POST : http://localurl/rest/V1/integration/admin/token?username=admin_user&password=admin_pass

Now add this token in api_key filed in upper right corder and apply. Check now. If still the page shown as blank then refresh the page.

Check this for more details. Thanks!

  • @Rahuk Barot thanks, i had created the token already if it enter and click the apply no action are working
    – Sabareesh
    Commented Jun 24, 2021 at 11:30
  • Did you tried to refresh the page? Commented Jun 24, 2021 at 11:33
  • Yes i tried refresh, clear all static content and di compile, i had added the third image of the error at console.
    – Sabareesh
    Commented Jun 24, 2021 at 11:38
  • Can you check Updated post @Raghul Barot
    – Sabareesh
    Commented Jun 24, 2021 at 11:45
  • @Sabareesh as I have checked above steps worked for me Commented Jun 24, 2021 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.