a RapiDoc server with live monitoring and reload
a RapiDoc server that watches for changes in your spec file and automatically reloads connected browser sessions with ever spec file change.
Note: uses
serve-reload-replaceunder the hood to run the HTTP server, and monitor changes
- define an environment variable
spec-urlto point to your spec file (http url or local path) - if a local path: mount your specs file(s) to
/www/, setspec-urlpath starts with/
$ docker run -it -p 8080:8080 -v /path/to/petstore.yaml:/www/petstore.yaml -e "spec-url=/spec/petstore.json" rapidoc-serverWhile you can use a full url to a spec file, it will not watch for changes / automatically reload.
$ docker run -it -p 8080:8080 -e "spec-url=https://petstore.swagger.io/v2/swagger.json" rapidoc-serverversion: 3.8
services:
docs:
build: .
ports:
- 8080:8080
volumes:
- ./my-spec.json:/www/my-spec.json
environment:
spec-url: /petstore.json
theme: darkAll the RapiDoc Attributes are supported through environment variables:
$ docker run -it --rm -p 8080:8080 \
-e "spec-url=https://petstore.swagger.io/v2/swagger.json" \
-e "show-header=false" \
-e "show-info=false" \
-e "allow-authentication=false" \
-e "allow-server-selection=false" \
-e "allow-api-list-style-selection=false" \
-e "theme=dark" \
-e "render-style=read" \
rapidoc-serverAuthor: Ahmad Nassri • Twitter: @AhmadNassri