A GitHub Action for validating JSON files against a remote schema
On the backend, this uses AJV to perform the validation
Url to the remote schema JSON file to validate against
Comma-separated list directories to validate
Enables 'all errors' validation on AJV
Enables 'strict mode' in AJV
The JSON schema draft version (defaults to 2019)—only supports '2020' and '2019'
You can use this action to generate artifacts with the type bindings in your preferred languages.
For example, you might design a workflow to generate bindings for both TypeScript and Rust, e.g.
name: Build
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: API Schema
uses: thomasmost/[email protected]
with:
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
target-dir: samples