Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/postman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ Once env vars are configured, the setup scripts can be run locally using the Mak

## Automatic updates

Postman collection is regerented automatically by github action [`release-spec.yml`](../../.github/workflows/release-spec.yml)
Postman collection is regenerated automatically by github action [`release-spec.yml`](../../.github/workflows/release-spec.yml).
14 changes: 10 additions & 4 deletions tools/postman/scripts/transform-for-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ jq --arg desc "$description" \
'.collection.info.description.content = $desc' \
intermediateCollectionWithName.json > intermediateCollectionWithDescription.json

echo "Adding baseUrl env $BASE_URL"
echo "Removing all variables. We use environment for variables instead"
jq \
'.collection.variable = []' \
intermediateCollectionWithDescription.json > intermediateCollectionWithNoVar.json

echo "Adding baseUrl property $BASE_URL"
jq --arg base_url "$BASE_URL" \
'.collection.variable[0].value = $base_url' \
intermediateCollectionWithDescription.json > intermediateCollectionWithBaseURL.json
'.collection.variable += [{ key: "baseUrl", value: $base_url }]' \
intermediateCollectionWithNoVar.json > intermediateCollectionWithBaseURL.json

if [ "$TOGGLE_ADD_DOCS_LINKS" = "true" ]; then
echo "Adding links to docs for each request"
Expand Down Expand Up @@ -130,6 +135,7 @@ rm intermediateCollectionWrapped.json \
intermediateCollectionWithDescription.json \
intermediateCollectionWithBaseURL.json \
intermediateCollectionWithLinks.json \
intermediateCollectionPostBody.json
intermediateCollectionPostBody.json \
intermediateCollectionWithNoVar.json

popd -0
Loading