Files
zeekay 5bdfcde7bd swift: the README describes the client this repo carries
It called itself a landing page pointing elsewhere while Sources/Hanzo
holds the generated client. The quickstart now names HanzoAPIConfiguration
and getModels as they are declared, and says plainly that getModels
returns nothing to decode.

scripts/generate.sh is the call site every other SDK has: it names swift
and this checkout, and nothing about how.
2026-08-23 12:36:52 -07:00

24 lines
979 B
Bash
Executable File

#!/usr/bin/env bash
# The call site. Nothing about HOW this SDK is generated lives here.
#
# The invocation is logic and lives once, in hanzoai/openapi's `generate.py`;
# every per-language knob is data in `sdks.yaml` beside it. This file says
# "swift, into this checkout" and nothing else.
#
# ./scripts/generate.sh # regenerate Sources/Hanzo + Package.swift
# ./scripts/generate.sh --check # fail if the committed tree has drifted
#
# BOTH INPUTS ARRIVE AS VALUES. $SPEC is the document, already fetched at a
# pinned ref and digest-checked; $OPENAPI is the checkout holding the driver.
# hanzoai/ci's client lane sets both.
#
# Requires: java 17+, uv.
set -euo pipefail
cd "$(dirname "$0")/.."
: "${OPENAPI:?the generator lives in hanzoai/openapi; the ci client lane sets OPENAPI, or point it at a checkout}"
if [ -n "${SPEC:-}" ]; then set -- --spec "$SPEC" "$@"; fi
exec uv run --with pyyaml python3 "$OPENAPI/generate.py" swift --repo "$PWD" "$@"