Skip to content

Commit feec4d9

Browse files
whummerclaude
andcommitted
fix(wiremock): restore bundled stubs.json; remote URL now redirects to HTML
library.wiremock.org redirects to an HTML page rather than serving the JSON file, making the remote URL permanently broken for this use case. Use the bundled local file directly instead of attempting a download. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3e5b1a1 commit feec4d9

2 files changed

Lines changed: 1156 additions & 6 deletions

File tree

wiremock/bin/create-stubs.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
# Import stubs into OSS WireMock (for WireMock Runner, use setup-wiremock-runner.sh)
44

5-
STUBS_URL="${STUBS_URL:-https://library.wiremock.org/catalog/api/p/personio.de/personio-de-personnel/personio.de-personnel-stubs.json}"
6-
TMP_STUBS_FILE="/tmp/personio-stubs.json"
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
STUBS_FILE="${SCRIPT_DIR}/../sample-app-oss/stubs.json"
77
WIREMOCK_URL="${WIREMOCK_URL:-http://wiremock.localhost.localstack.cloud:4566}"
88

9-
echo "Downloading stubs from ${STUBS_URL}..."
10-
curl -sL -o "$TMP_STUBS_FILE" "$STUBS_URL"
11-
9+
# Note: stubs are bundled locally because library.wiremock.org now redirects to HTML
10+
# rather than serving the JSON file directly, making the remote URL unreliable.
1211
echo "Importing stubs into WireMock at ${WIREMOCK_URL}..."
13-
curl -v -X POST -H "Content-Type: application/json" --data-binary "@$TMP_STUBS_FILE" "${WIREMOCK_URL}/__admin/mappings/import"
12+
curl -v -X POST -H "Content-Type: application/json" --data-binary "@$STUBS_FILE" "${WIREMOCK_URL}/__admin/mappings/import"
1413

1514
echo ""
1615
echo "Verify stubs at: ${WIREMOCK_URL}/__admin/mappings"

0 commit comments

Comments
 (0)