diff --git a/api/Dockerfile.multi b/api/Dockerfile.multi index 3b75e77..a7bf6c9 100644 --- a/api/Dockerfile.multi +++ b/api/Dockerfile.multi @@ -20,9 +20,13 @@ COPY ./TimeAddressableMediaStore.yaml . ############################################################################### FROM redocly/cli as bundle +COPY ./bundle-api.sh /bundle-api.sh + # Copy in documentation source files COPY --from=layer /api /data +ENTRYPOINT [ "/bundle-api.sh" ] + ############################################################################### # Stage: oaslint - Validates OpenAPI specifications ############################################################################### diff --git a/api/bundle-api.sh b/api/bundle-api.sh new file mode 100755 index 0000000..9f222aa --- /dev/null +++ b/api/bundle-api.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -euo pipefail + +# Custom script to run the Redocly CLI bundler, then work around https://github.com/Redocly/redocly-cli/issues/792 +# Passes all CLI args to the Redocly CLI, then calls `sed` to make manual edits as needed +redocly $@ | \ + sed -e s_http-request.json_\'#/components/schemas/http-request\'_g