gen-relationships

command
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Command gen-relationships reads configs/relationship-types.yaml and emits generated source files for both the Go backend and the TypeScript frontend.

Usage:

cd api && go run ./cmd/gen-relationships

Or via the Makefile target:

make generate-relationships

The YAML file is the SINGLE SOURCE OF TRUTH for the asset relationship type registry. The generated files (relationship_types_generated.go on the Go side, relationship.types.generated.ts on the TS side) are committed but must NEVER be edited by hand — they will be overwritten on the next run.

Workflow when adding a new relationship type:

  1. Edit api/configs/relationship-types.yaml
  2. Run `make generate-relationships`
  3. Commit the YAML + the two generated files together

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL