diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e14257e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/* +*.iml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c9c2ce..1807e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v3.25.0-1] - 2020-05-26 +### Added +- added template for the index page +- added etcd key to set the SwaggerValidator + ## [v3.25.0-1] - 2020-04-08 ### Added -* add Swagger UI in version 3.25.0 \ No newline at end of file +* add Swagger UI in version 3.25.0 diff --git a/Dockerfile b/Dockerfile index 56537b7..77695f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN npm run build FROM registry.cloudogu.com/official/base:3.10.3-2 LABEL NAME="official/swaggerui" \ - VERSION="3.25.0-1" \ + VERSION="3.25.0-2" \ maintainer="christian.beyer@cloudogu.com" ENV SERVICE_TAGS=webapp diff --git a/dogu.json b/dogu.json index b0a99b8..f3ddd8b 100644 --- a/dogu.json +++ b/dogu.json @@ -1,6 +1,6 @@ { "Name": "official/swaggerui", - "Version": "3.25.0-1", + "Version": "3.25.0-2", "DisplayName": "Swagger UI", "Description": "Swagger UI displays your openAPI specification.", "Logo": "https://github.com/cloudogu/swagger-ui/blob/master/src/img/logo_small.png?raw=true", @@ -16,6 +16,13 @@ "Dependencies": [ "nginx" ], + "Configuration": [ + { + "Name": "validator_url", + "Description": "Set the url of the swaggerui validator.", + "Optional": true + } + ], "HealthChecks": [ { "Type": "tcp", diff --git a/resources/startup.sh b/resources/startup.sh index 08c8554..893f420 100755 --- a/resources/startup.sh +++ b/resources/startup.sh @@ -5,11 +5,15 @@ set -o pipefail NGINX_ROOT=/var/www/html INDEX_FILE=$NGINX_ROOT/index.html +INDEX_TEMPLATE_PATH=/var/www/html/index.html.tpl +INDEX_FILE_PATH=/var/www/html/index.html doguctl state "starting" # remove swagger.json from index.html sed -i "s|https://petstore.swagger.io/v2/swagger.json||g" $INDEX_FILE +doguctl template "${INDEX_TEMPLATE_PATH}" "${INDEX_FILE_PATH}" + doguctl state "ready" # Start nginx diff --git a/resources/var/www/html/index.html.tpl b/resources/var/www/html/index.html.tpl new file mode 100644 index 0000000..af911a9 --- /dev/null +++ b/resources/var/www/html/index.html.tpl @@ -0,0 +1,65 @@ + + + + + + Swagger UI + + + + + + + +
+ + + + + +