mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Serve SwaggerUI * Add api server doc * Copy swagger.yaml when running `make install` * Check swagger.yaml if up-to-date * Script to copy swagger-ui files
14 lines
397 B
Bash
Executable File
14 lines
397 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
TEMPDIR=$(mktemp -d)
|
|
(
|
|
cd ${TEMPDIR} &&
|
|
git clone -b master --depth 1 --single-branch https://github.com/swagger-api/swagger-ui/ .
|
|
)
|
|
rm -rf pkg/apiserver-impl/swagger-ui/*
|
|
cp -R ${TEMPDIR}/dist/* pkg/apiserver-impl/swagger-ui/
|
|
rm -rf ${TEMPDIR}
|
|
sed -i "s|https://petstore.swagger.io/v2/swagger.json|./swagger.yaml|" pkg/apiserver-impl/swagger-ui/swagger-initializer.js
|