update swagger-ui

This commit is contained in:
Mikaël Cluseau
2019-02-04 14:03:59 +11:00
parent e93b84b60c
commit 12cfc86560
5 changed files with 13 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,12 @@ v=3.20.6
file=v$v.tar.gz
set -ex
[ -e swagger-ui/$file ] ||
wget -P swagger-ui https://github.com/swagger-api/swagger-ui/archive/$file
rm -fr swagger-ui/dist
tar zxvf swagger-ui/$file --strip-components=1 -C swagger-ui swagger-ui-$v/dist
sed -i -e '/url:/s,https.*/,/,' swagger-ui/dist/index.html
sed -i -e '/url:/s,https://petstore.swagger.io/v2/swagger.json,/swagger.json,g' swagger-ui/dist/*