在合并前根据上游 JSON schema 验证 CI 和应用程序配置文件
Use check-jsonschema when an agent needs to catch broken GitHub Actions, Renovate, Azure Pipelines, and other schema-backed config files before they hit CI. The agent picks the right schema hook, validates the changed files, and reports the exact key or structure that drifted from the contract.
Prerequisites
Python 3.10+, pipx or pre-commit
Installation
Use the upstream install or setup path that matches your environment:
- pipx install check-jsonschema
- brew install check-jsonschema
Requirements and caveats from upstream:
-
-
- A JSON Schema CLI and pre-commit hook built on jsonschema.
Basic usage or getting-started notes:
- check-jsonschema can be installed and run as a CLI tool, or via pre-commit.
- ### Example pre-commit config
- The following configuration uses check-jsonschema to validate Github Workflow
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/python-jsonschema/check-jsonschema/HEAD/README.md
Documentation
- https://check-jsonschema.readthedocs.io/en/stable/