check-jsonschema is designed to seamlessly integrate into your workflow as
a pre-commit hook.
Validate JSON or YAML files against a jsonschema on disk or fetched via HTTP(S).
You must specify a schema using pre-commit args configuration.
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
files: ^data/.*\.json$
args: ["--schemafile", "schemas/foo.json"]Validate JSON Schema files against their matching metaschema, as specified in their
"$schema" key.
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-metaschema
files: ^schemas/.*\.json$Validate Azure Pipelines config against the schema provided by Microsoft
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-azure-pipelinesValidate Bamboo Specs against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-bamboo-specValidate Bitbucket Pipelines against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-bitbucket-pipelinesValidate Buildkite Pipelines against the schema provided by Buildkite
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-buildkiteValidate Changie configuration
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-changieValidate CircleCI config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-circle-ciValidate Citation File Format
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-citation-file-formatValidate Google Cloud Build config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-cloudbuildValidate Codecov config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-codecovValidate Docker Compose files against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-compose-specValidate Dependabot Config (v2) against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-dependabotValidate Drone-CI Config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-drone-ciValidate GitHub Actions against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-actionsValidate GitHub discussion against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-discussionValidate GitHub issue config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-issue-configValidate GitHub issue forms against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-issue-formsValidate GitHub Workflows against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-workflowsValidate GitLab CI config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-gitlab-ciValidate Meltano config against the schema provided by Meltano
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-meltanoValidate Mergify config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-mergifyValidate ReadTheDocs config against the schema provided by ReadTheDocs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-readthedocsValidate Renovate config against the schema provided by Renovate (does not support renovate config in package.json)
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-renovateValidate snapcraft files against the schema provided by Canonical
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-snapcraftValidate Taskfile config against the schema provided by Task
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-taskfileValidate Travis Config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-travisValidate Woodpecker Config against the schema provided by SchemaStore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-woodpecker-ciNote
This behaves slightly differently from check-github-workflows and is not
recommended. It is here only to demonstrate how --schemafile can be used.
The check-jsonschema hook can run any JSON Schema against a
file or set of files. For example, to implement the GitHub workflow check
manually, you could do this:
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
name: "Check GitHub Workflows"
files: ^\.github/workflows/[^/]+$
types: [yaml]
args: ["--schemafile", "https://json.schemastore.org/github-workflow"]check-jsonschema packages some builtin schemas for implementing checks.
To check with the builtin schema that a GitHub workflow sets
timeout-minutes on all jobs:
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
name: "Check GitHub Workflows set timeout-minutes"
files: ^\.github/workflows/[^/]+$
types: [yaml]
args: ["--builtin-schema", "github-workflows-require-timeout"]