1

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

1

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

0

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!

9
  • @Rahuk Barot thanks, i had created the token already if it enter and click the apply no action are working 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. Commented Jun 24, 2021 at 11:38
  • Can you check Updated post @Raghul Barot Commented Jun 24, 2021 at 11:45
  • @Sabareesh as I have checked above steps worked for me Commented Jun 24, 2021 at 11:46

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.