Mermade / openapi-gui

GUI / visual editor for creating and editing OpenAPI / Swagger definitions
https://mermade.github.io/openapi-gui/
MIT License
1.42k stars 170 forks source link

always display petstore #65

Closed sify21 closed 3 years ago

sify21 commented 4 years ago

I started the docker image with

docker run --name openapi-gui -v /root/containers/openapi/data:/data -p 8080:3000 -d mermade/openapi-gui npm start -- -d /data/oai.yaml -l -w

in container, I can see processes

PID   USER     TIME  COMMAND
    1 root      0:00 npm
   23 root      0:01 node openapi-gui.js -d /data/oai.yaml -l -w

However, when I go to browser and clear cache and visit main page, it still displays petstore. And if I hit the save button, the content of /data/oai.yaml will change to petstore. It seems that -w option is working

sify21 commented 4 years ago

Is this a problem only related to the dockerized app? Will it display the correct content when run on bare metal? I dont have node env so I cant verify.

MikeRalphson commented 4 years ago

Yes, I've just tested it locally and it works serving the given OpenAPI document.

sify21 commented 4 years ago

I found the problem. I need to add this parameter ?url=%2fserve to display the content of my document. Maybe this can be clarified in the README.md. Currently it's a bit vague about what the value of parameter url should be.

MikeRalphson commented 4 years ago

Thanks - will add an example in the README as you suggest.

MikeRalphson commented 3 years ago

README.md updated.