From 56feda7af3cda66fab50529f01dd6d84c8ac87d4 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Tue, 10 Sep 2024 10:20:57 +0100 Subject: [PATCH] doc: Adds support for SDK_BRANCH in schema generation (#2562) * doc: Add support for SDK_BRANCH * chore: revert unintentional change on save * doc: remove, can be confusing to users without cloud-dev access --- scripts/schema-scaffold.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/schema-scaffold.sh b/scripts/schema-scaffold.sh index 070e96d99c..ab1541a2bb 100755 --- a/scripts/schema-scaffold.sh +++ b/scripts/schema-scaffold.sh @@ -3,8 +3,9 @@ set -euo pipefail : "${1?"Name of resource or data source must be provided."}" +SDK_BRANCH="${SDK_BRANCH:-"main"}" # URL to download Atlas Admin API Spec -atlas_admin_api_spec="https://raw.githubusercontent.com/mongodb/atlas-sdk-go/main/openapi/atlas-api-transformed.yaml" +atlas_admin_api_spec="https://raw.githubusercontent.com/mongodb/atlas-sdk-go/${SDK_BRANCH}/openapi/atlas-api-transformed.yaml" echo "Downloading api spec" curl -L "$atlas_admin_api_spec" -o "./api-spec.yml"