Skip to main content
Hyperterse ships three role-based JSON Schema files for editor-time validation, autocompletion, and inline documentation.
Schema fileTarget filesPurpose
schema/root.terse.schema.json.hyperterseRoot service configuration
schema/adapter.terse.schema.jsonapp/adapters/*.terseAdapter definitions
schema/tool.terse.schema.jsonapp/tools/*/config.terseTool definitions

Generation

Schemas are generated from the project’s source schema definitions:
make generate
The generator reads connector and primitive type enums and emits JSON Schema files with the correct enum constraints.

Editor setup

Point your editor at the schema files to enable autocompletion, hover docs, and inline validation for .terse files.

VS Code / Cursor

Add to .vscode/settings.json:
{
  "yaml.schemas": {
    "schema/root.terse.schema.json": "**/.hyperterse",
    "schema/adapter.terse.schema.json": "**/adapters/*.terse",
    "schema/tool.terse.schema.json": "**/tools/**/config.terse"
  }
}
Requires the YAML extension.

JetBrains IDEs

Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings. Add one mapping per schema with the appropriate file pattern.

Schema highlights

Each schema enforces required fields, value constraints, and structural rules for its configuration level.

Root (root.terse.schema.json)

  • name — Required. Pattern: ^[a-z][a-z0-9_-]*$.
  • version — Optional string.
  • root — String (default discovery root: app).
  • tools.directory — String (default: tools).
  • tools.cacheenabled (boolean), ttl (integer).
  • adapters.directory — String (default: adapters).
  • server.port — Integer or string.
  • server.log_level — Integer, 1–4.
  • build.out / build.out_dir — String.
  • build.clean_dir — Boolean.

Adapter (adapter.terse.schema.json)

  • connector — Required. Enum: postgres, redis, mysql, mongodb.
  • connection_string — Required string.
  • name — Optional.
  • options — Optional map.

Tool (tool.terse.schema.json)

  • description — Required string.
  • use — String.
  • statement — String.
  • inputs — Map of typed definitions.
  • handler — Optional script handler path (path#exportName supported; defaults to export default).
  • mappers — Optional input / output mapper paths (path#exportName supported; defaults to export default).
  • authplugin, policy.
  • cacheenabled, ttl.
  • Constraint: exactly one of use or handler is required (enforced via oneOf).

Keeping schemas in sync

When configuration shapes change, schemas and documentation must update in the same change:
  1. Regenerate schema artifacts in schema/.
  2. Update field definitions in reference documentation.
  3. Update .vscode/settings.json globs if file-role matching changed.
  4. Verify the change includes current schema files.