bitwizeshift/Validate JSON Schema
Validate a JSON file against a JSON schema. This action uses the `ajv` package to validate a JSON file against a JSON schema. It is useful for ensuring that a JSON file meets a certain structure or format.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stalelast commit Jun 17, 2024
- License
- MIT
Pinned Snippet
uses: bitwizeshift/actions-jsonschema@b74019d6bf621d792d6ff9bfb8e1ddb186f31756 # v1.1.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| paths | The file or files to validate. May be a glob expression. Separate expressions are separated by either comma or newlines. | yes | — |
| schema | JSON schema to validate against the input file. This may be either a relative path to a JSON schema file on disk or a URL to a schema to validate against | yes | — |
| cache-key | The cache key to use for caching the schema. Only applicable if the schema is downloaded from a URL. | no | "" |
| github-token | The GitHub token to use for authenticating with github. This enables the 'diff' option how much gets authenticated. | no | ${{ github.token }} |
| scope | The scope of the validation. This can be one of 'all' or 'diff'. - 'all' checks all files for schema validation erorrs. - 'diff' checks only changed files for schema validation errors. | no | all |
Outputs
| name | description |
|---|---|
| status | The status of the validation. This will be 'success' if the validation passes, and 'failure' if the validation fails. |