funkwhale/docs/build_swagger.sh

11 wiersze
411 B
Bash
Czysty Zwykły widok Historia

2018-04-26 16:12:08 +00:00
#!/bin/bash -eux
2022-01-28 12:33:39 +00:00
SWAGGER_VERSION="4.1.3"
2018-04-26 16:12:08 +00:00
TARGET_PATH=${TARGET_PATH-"swagger"}
rm -rf $TARGET_PATH /tmp/swagger-ui
git clone --branch="v$SWAGGER_VERSION" --depth=1 "https://github.com/swagger-api/swagger-ui.git" /tmp/swagger-ui
mv /tmp/swagger-ui/dist $TARGET_PATH
2022-01-28 12:33:39 +00:00
cp schema.yml $TARGET_PATH
2020-07-05 09:00:04 +00:00
cp -r api $TARGET_PATH/api
2022-01-28 12:33:39 +00:00
sed -i "s,https://petstore.swagger.io/v2/swagger.json,schema.yml,g" $TARGET_PATH/index.html