Created
December 7, 2020 17:56
-
-
Save toefel18/17e13837fc528048b4e62812205a47d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -e $FILE ]; | |
then | |
echo "Usage:" | |
echo "FILE=https://some/location/swagger.yml ./run-swagger-ui.sh" | |
exit 1 | |
fi | |
curl -s -o swagger.yml $FILE | |
echo visit http://localhost:8080 rendering docs of $FILE | |
echo ctrl + c to stop | |
docker run --rm --mount "type=bind,source=$(pwd)/swagger.yml,target=/usr/share/nginx/html/swagger.yml" -it -p 8080:8080 -e "SWAGGER_JSON_URL=http://localhost:8080/swagger.yml" swaggerapi/swagger-ui | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment