mkdocs-swagger-plugin icon indicating copy to clipboard operation
mkdocs-swagger-plugin copied to clipboard

Plugin causes application to not start, stuck in reload loop

Open jkketts opened this issue 5 years ago • 4 comments

I am trying to get this plugin added into my project. My .yml document looks like

plugins:
  - swagger
extra:
  swagger_url: 'myurl.com/swagger.json'

When I try to start the application with mkdocs serve, it is stuck with a

Reload 1 waiters: {path to swagger_plugin.js}

I tried running mkdocs serve --no-livereload, but when I go to check the !!GET /myEndpoint/!!, the document just shows up on the website as "GET /myEndpoint" and none of the swagger info.

I am using mkdocs-material, mkdocs version 1.0.4, and python 3.7.

jkketts avatar Nov 27 '19 22:11 jkketts

Partially fixed it - realized that swagger needs to be in quotes. Maybe the readme can be updated to reflect that? I'm still not able to get the data to populate into the !!GET /myEndpoint!! though. Is there anyway to debug what might be causing the issue?

jkketts avatar Nov 27 '19 22:11 jkketts

Hi, sorry for the delay. The !!GET /myEndpoint!! should create a button for see which paramenters the API accepts and another button to invoke it.

Could you share some other information? Is there some JS error? Are you sure the JS is able to download the swagger definition?

allevo avatar Dec 02 '19 21:12 allevo

HI, i had the same issue on first start of mkdocs serve. But after restart the loop was gone.

hschaefer123 avatar Apr 07 '20 08:04 hschaefer123

Hi,

I have been facing the same issue. Few things i had noticed here is, when running it with mkdocs serve, the page keeps reloading. This blocks the ui from being usable.

The js file, contains the static pet store url, which doesnt allow said api url from the yml file to load.

shakilbharucha avatar Aug 25 '20 12:08 shakilbharucha