Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-circle

GitHub Action

Validate JSON Schemas

v1.0.4

Validate JSON Schemas

check-circle

Validate JSON Schemas

Find json files and validate them agains $schema

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Validate JSON Schemas

uses: walbo/validate-json@v1.0.4

Learn more about this action in walbo/validate-json

Choose a version

Validate JSON Action

Validate JSON files against their $schema.

Usage:

name: Validate JSON

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Validate JSON
        uses: walbo/validate-json@v1.0.4
        with:
          files: folder/**/*.json

          # optional, defaults to `$schema` in your JSON file
          schema: schemas/schema.json

          # optional, default: draft-04
          schema-version: draft-04

          # optional, default: false
          print-valid-files: false

          # optional, default: false
          fail-on-missing-schema: false

          # optional, default: true
          strict: true

          # optional, default: false
          allow-matching-properties: false

          # optional, default: true
          allow-union-types: true