Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ Thumbs.db
test-results/
playwright-report/
playwright/.cache/
.checkly_openapi_tmp.json
7 changes: 6 additions & 1 deletion update-api-spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

LIVE_API_URL="https://api.checklyhq.com/openapi.json"
API_SPEC_PATH="./api-reference/openapi.json"
TEMP_FILE="/tmp/checkly_openapi.json"
TEMP_FILE="./.checkly_openapi_tmp.json"

echo "📥 Fetching live API specification from $LIVE_API_URL..."
curl -s "$LIVE_API_URL" > "$TEMP_FILE"
Expand All @@ -16,6 +16,11 @@ if [ ! -s "$TEMP_FILE" ]; then
exit 1
fi

echo "🔧 Fixing invalid OpenAPI schema fields..."
# Fix maxPacketLossThreshold.minimum which contains a Joi.ref() object instead of a number
jq '.components.schemas.IcmpMonitorCreate.properties.maxPacketLossThreshold.minimum = 0
| .components.schemas.IcmpMonitorUpdate.properties.maxPacketLossThreshold.minimum = 0' "$TEMP_FILE" > "${TEMP_FILE}.fixed" && mv "${TEMP_FILE}.fixed" "$TEMP_FILE"

echo "🔧 Cleaning up HTML in descriptions..."
# Convert common HTML tags to Markdown
# Order matters: convert <code> first so <b> patterns work on remaining content
Expand Down
Loading