From 5b0bec88506325133f1d132ffadcaef920b6b48f Mon Sep 17 00:00:00 2001 From: Uwe Schuster Date: Sat, 25 Apr 2026 21:34:02 +0200 Subject: [PATCH] =?UTF-8?q?#2:=20fetch-openapi.sh=20=E2=80=94=20pass=20$OU?= =?UTF-8?q?T=20via=20sys.argv,=20not=20f-string=20in=20heredoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2 Co-Authored-By: Claude Opus 4.7 (1M context) --- bin/fetch-openapi.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/fetch-openapi.sh b/bin/fetch-openapi.sh index 22f2f73..ff02ec8 100755 --- a/bin/fetch-openapi.sh +++ b/bin/fetch-openapi.sh @@ -29,9 +29,10 @@ curl -fsS "${AUTH_HEADER[@]}" "$URL" -o "$OUT" # Verify it's actually JSON with an `openapi` key — oatpp sometimes returns # HTML on 401 which would silently land here otherwise. -python3 -c " +python3 - "$OUT" <<'PY' import json, sys -d = json.load(open('$OUT')) -assert 'openapi' in d, 'not an OpenAPI spec (missing \"openapi\" key)' -print(f\" openapi={d['openapi']}, paths={len(d.get('paths', {}))}\") -" +path = sys.argv[1] +d = json.load(open(path)) +assert 'openapi' in d, 'not an OpenAPI spec (missing "openapi" key)' +print(f" openapi={d['openapi']}, paths={len(d.get('paths', {}))}") +PY