You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
codefirst-docdeployer/generators/swagger.sh

24 lines
491 B

GEN_PATH="/docs/swagger"
generate() {
if [[ ! "$1" ]]; then
echo "missing swagger config file ($1)" >&2
fi
mkdir -p $GEN_PATH
cat <<EOF > $GEN_PATH/CLICKME.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=\"Refresh\" content=\"0; url=/swagger?url=/documentation/${RELATIVE_PATH}$1\" />
</head>
<body>
<p>Suivez <a href=\"/swagger?url=/swagger?url=/documentation/${RELATIVE_PATH}$1\">ce lien</a>.</p>
</body>
</html>
EOF
mv "$1" $GEN_PATH
}