omnigraph/.pre-commit-config.yaml

11 lines
465 B
YAML
Raw Normal View History

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)$