Swagger Editor and Supporting Services
- 5 years ago
The Docker image for SwaggerEditor is missing support for overriding configuration at the moment. There are two (old) issues that track that:
- https://github.com/swagger-api/swagger-editor/issues/1488
- https://github.com/swagger-api/swagger-editor/issues/1547
It'd be great if you were interested in pushing any of those issues forward, as it's not a high priority for the core contributors at the moment.
One way to achieve your goal is to override the default index.html, with the new URL configured in it.
Something like
docker run -it --rm -p 8080:8080 -v "$(pwd)/index.html:/usr/share/nginx/html/index.html" swaggerapi/swagger-editorWhere `$(pwd)` is the directory where your copy of index.html.
The official index.html is here: https://github.com/swagger-api/swagger-editor/blob/master/index.html.
And an example with the URLs overwritten can be found here: https://gist.github.com/ponelat/a63e894c87fdc626b520c69aa13ccba7#file-index-html-L56-L58