mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
16ed93b9a2
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.
17 lines
490 B
Bash
Executable File
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!"
|