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
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_SHA256to the pinned spec hash; the script will verify and emit.oas.sha256in the output. - OpenAPI Generator CLI 7.4.0 jar at
tools/openapi-generator-cli-7.4.0.jaror overrideSTELLA_OPENAPI_GENERATOR_JAR. - JDK 21 available on PATH (vendored at
../tools/jdk-21.0.1+12; setJAVA_HOMEaccordingly).
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.sha256for 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_LANGbeing set by the script. - Override output directory via
STELLA_SDK_OUTto avoid mutating the repo during local tests.