mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-15 01:55:13 +02:00
Wire a local pre-commit hook that regenerates openapi.json whenever the server source changes, and document the workflow in CONTRIBUTING. Opt-in via `pre-commit install`; the existing CI test remains the authoritative drift check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
465 B
YAML
10 lines
465 B
YAML
repos:
|
|
- repo: local
|
|
hooks:
|
|
- id: openapi-sync
|
|
name: Sync openapi.json
|
|
description: Regenerate openapi.json when the server API surface changes.
|
|
entry: bash -c 'OMNIGRAPH_UPDATE_OPENAPI=1 cargo test -p omnigraph-server --test openapi openapi_spec_is_up_to_date --quiet'
|
|
language: system
|
|
pass_filenames: false
|
|
files: ^(crates/omnigraph-server/src/.*\.rs|crates/omnigraph-server/Cargo\.toml|openapi\.json)$
|