Files
zeekay 34e2e06bdf The C# client, generated from hanzo-inc/cloud@a779b8b229 (8.5.988)
Every /v1 operation the gateway serves as a typed method, generated by
hanzoai/openapi's driver from its `csharp` row (openapi-generator 7.14.0,
httpclient library). Published as `Hanzo` on nuget.org, namespace
Hanzo.AI. The repo owns the csproj, Gateway.cs (endpoint, bearer and
X-Org-Id from the environment), seven wire tests against a stub transport,
and the six flows every Hanzo SDK carries. hanzo.yml gates all three and
puts the repo on the client lane; release.yml pushes a version nuget.org
does not yet serve. scripts/dotnet installs a .NET 10 SDK where a runner
has none.
2026-11-06 12:59:19 -08:00

22 lines
913 B
Bash
Executable File

#!/usr/bin/env bash
# Regenerate src/Hanzo.AI/{Api,Client,Model} from the Hanzo Cloud API document.
#
# A call site, not a generator invocation: the invocation lives once, in
# hanzoai/openapi `generate.py`, and every C# knob is the `csharp` row of its
# `sdks.yaml`.
#
# ./scripts/generate.sh # regenerate in place
# ./scripts/generate.sh --check # non-zero if the committed client drifted
#
# $SPEC is the document, already fetched at the ref `.spec-lock` names and
# digest-checked; $OPENAPI is a checkout of hanzoai/openapi. hanzoai/ci's
# client lane sets both. Requires uv and java 11+.
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" csharp --repo "$PWD" "$@"