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:
- Edit api/configs/relationship-types.yaml
- Run `make generate-relationships`
- Commit the YAML + the two generated files together
Click to show internal directories.
Click to hide internal directories.