mirror of
https://github.com/hanzo-js/sdk-angular.git
synced 2026-10-30 15:17:05 +00:00
A projection of hanzoai/cloud's openapi.yaml at the ref .spec-lock names — 2479 operations, 192 injectable services, 2460 models — generated by hanzoai/openapi's generate.py from the `angular` row of its sdks.yaml. Nothing under src/ is written by hand. It exists because the framework owns the transport and the return type: an axios client is a second HTTP stack no interceptor sees, and a wrapped promise is an Observable that cannot be cancelled. serviceSuffix is Api rather than the generator's Service default because this API has a product called `base`, whose default class name is the generated transport's own parent.
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
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
|
|
# "angular, into this checkout" and nothing else.
|
|
#
|
|
# ./scripts/generate.sh # regenerate src/
|
|
# ./scripts/generate.sh --check # fail if committed src/ 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, because it holds the one credential that
|
|
# reads the forge.
|
|
#
|
|
# uv rather than a bare python3: the driver needs PyYAML and the runner image
|
|
# promises no interpreter at all, let alone one with it installed.
|
|
#
|
|
# 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" angular --repo "$PWD" "$@"
|