Files
vectorize-io__hindsight/scripts/generate-bank-template-schema.sh
Mr. Khachaturov 16ed93b9a2 fix(docs): regenerate bank-template-schema.json and guard drift (#1065)
hindsight-docs/static/bank-template-schema.json is hand-edited.
Nothing regenerates it and nothing checks it. Three PRs have
changed BankTemplateManifest since it was last touched:
#902 flipped entity_labels from list[str] to list[dict[str, Any]],
#1044 added ten BankTemplateConfig fields, #1048 added three
MentalModelTrigger fields.

None of the bundled templates use the new fields, so Ajv in
check-templates.mjs still passes. A template that uses the
dict-shaped label format fails with 'should be string' on
every label.

Regenerate from BankTemplateManifest.model_json_schema() and
hook the generator into verify-generated-files alongside
generate-openapi and generate-clients.
2026-04-15 09:18:19 +02:00

17 lines
490 B
Bash
Executable File

#!/bin/bash
set -e
# Regenerate hindsight-docs/static/bank-template-schema.json from the
# BankTemplateManifest Pydantic model. This file is the source of truth
# for Ajv validation in hindsight-docs/scripts/check-templates.mjs and
# is served verbatim at /bank-template-schema.json on the docs site.
cd "$(dirname "$0")/.."
echo "Generating bank template JSON Schema..."
cd hindsight-dev
uv run generate-bank-template-schema
echo ""
echo "Bank template schema generated successfully!"