omnigraph/CONTRIBUTING.md
Ragnor Comerford 7427d87e9a
Add opt-in git hook for openapi.json drift
Track a project pre-commit hook under scripts/hooks/ that regenerates
openapi.json when server source is staged, and auto-stages the updated
spec into the commit. Zero external dependencies — plain bash + cargo.

Enable via `git config core.hooksPath scripts/hooks`. The CI drift
test remains the authoritative check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 16:19:08 +02:00

1,021 B

Contributing

Small bug fixes and documentation improvements are welcome directly through pull requests.

For larger changes, please open an issue or design discussion first so the proposed direction is clear before implementation starts.

Development

cargo build --workspace
cargo test --workspace

If you touch S3-backed flows, the CI model uses a local RustFS instance for integration tests.

OpenAPI spec

openapi.json is a committed artifact generated from the Utoipa annotations in crates/omnigraph-server. CI fails if it drifts from the source. To regenerate manually:

OMNIGRAPH_UPDATE_OPENAPI=1 cargo test -p omnigraph-server --test openapi openapi_spec_is_up_to_date

Optional: enable the project's git hook to regenerate automatically when you commit server changes:

git config core.hooksPath scripts/hooks

Pull Requests

  • keep changes focused
  • include tests for behavior changes when practical
  • update public docs when the user-facing surface changes