Files
git.stella-ops.org/src/Sdk/StellaOps.Sdk.Generator/ts
StellaOps Bot ea970ead2a
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
sdk-generator-smoke / sdk-smoke (push) Has been cancelled
SDK Publish & Sign / sdk-publish (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
up
2025-11-27 07:46:56 +02:00
..
up
2025-11-24 20:57:49 +02:00
up
2025-11-24 20:57:49 +02:00
up
2025-11-27 07:46:56 +02:00
up
2025-11-27 07:46:56 +02:00
up
2025-11-27 07:46:56 +02:00

TypeScript SDK (SDKGEN-63-001)

This directory contains deterministic generator settings for the TypeScript SDK.

Prereqs

  • OpenAPI spec file path exported as STELLA_OAS_FILE (temporary until APIG0101 publishes the canonical spec).
  • Optional but recommended: set STELLA_OAS_EXPECTED_SHA256 to the pinned spec hash; the script will verify and emit .oas.sha256 in the output.
  • OpenAPI Generator CLI 7.4.0 jar at tools/openapi-generator-cli-7.4.0.jar or override STELLA_OPENAPI_GENERATOR_JAR.
  • JDK 21 available on PATH (vendored at ../tools/jdk-21.0.1+12; set JAVA_HOME accordingly).

Generate

cd src/Sdk/StellaOps.Sdk.Generator
STELLA_OAS_FILE=/path/to/api.yaml \
STELLA_SDK_OUT=$(mktemp -d) \
STELLA_OPENAPI_GENERATOR_JAR=tools/openapi-generator-cli-7.4.0.jar \
STELLA_OAS_EXPECTED_SHA256=$(sha256sum /path/to/api.yaml | awk '{print $1}') \
ts/generate-ts.sh

Outputs land in out/typescript/ and are post-processed to:

  • Normalize whitespace/line endings.
  • Inject traceability banner.
  • Copy shared helpers (sdk-hooks.ts) and wire them through the package barrel.
  • Record the spec hash to .oas.sha256 for downstream provenance checks.

To validate the pipeline locally with a tiny fixture spec (ts/fixtures/ping.yaml), run:

cd src/Sdk/StellaOps.Sdk.Generator/ts
./test_generate_ts.sh   # skips if the generator jar is absent

Notes

  • README/package.json are suppressed in generator output; Release pipeline provides deterministic packaging instead.
  • Global properties disable model/api docs/tests to keep the alpha lean and deterministic.
  • Helper wiring depends on STELLA_POSTPROCESS_ROOT/STELLA_POSTPROCESS_LANG being set by the script.
  • Override output directory via STELLA_SDK_OUT to avoid mutating the repo during local tests.