Browse Source

Merge pull request #31 from EvgenyOrekhov/update-swagger-ui

Fix #30: make URL to swagger.json relative in swagger-ui/run.sh
pull/32/head
Johannes Schickling 8 years ago
committed by GitHub
parent
commit
bcf0b3924e
  1. 4
      swagger-ui/run.sh

4
swagger-ui/run.sh

@ -9,8 +9,8 @@ if [ "$API_KEY" != "**None**" ]; then
fi fi
if [[ -f $SWAGGER_JSON ]]; then if [[ -f $SWAGGER_JSON ]]; then
sed -i "s|http://petstore.swagger.io/v2/swagger.json|/swagger.json|g" index.html
sed -i "s|http://example.com/api|/swagger.json|g" index.html
sed -i "s|http://petstore.swagger.io/v2/swagger.json|swagger.json|g" index.html
sed -i "s|http://example.com/api|swagger.json|g" index.html
else else
sed -i "s|http://petstore.swagger.io/v2/swagger.json|$API_URL|g" index.html sed -i "s|http://petstore.swagger.io/v2/swagger.json|$API_URL|g" index.html
sed -i "s|http://example.com/api|$API_URL|g" index.html sed -i "s|http://example.com/api|$API_URL|g" index.html

Loading…
Cancel
Save