Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No layout defined for "StandaloneLayout" error while loading swagger ui through unpkg

Tags:

swagger-ui

I am trying to use unpkg to load the swagger UI as mentioned in the documentaion here

And when it loads it throws an error saying

No layout defined for "StandaloneLayout"

Anyone has any idea about this?

like image 327
Sunny Agarwal Avatar asked Mar 13 '18 05:03

Sunny Agarwal


People also ask

How do I get json from Swagger UI?

If you don't see the url or if url is a code expression, open the browser dev tools, switch to the Network tab and disable caching. Then refresh the page and search for the API definition file ( swagger. json , swagger. yaml , api-docs or similar) among HTTP requests.


1 Answers

For those looking for answers, here is the complete html that actually works

https://github.com/sunnyagarwal008/setup-swagger-ui-in-one-page/blob/master/swagger-ui.html

like image 120
Sunny Agarwal Avatar answered Apr 29 '23 00:04

Sunny Agarwal