Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmost committed Sep 11, 2024
1 parent 8186fb1 commit 4be2ab9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 23 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
name: Test
on: push
jobs:
test:
name: Test Valid
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Local Action
uses: ./
with:
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
target-dir: samples
test_invalid:
name: Test Invalid
runs-on: ubuntu-latest
Expand All @@ -29,4 +18,15 @@ jobs:
if: (${{ success() }} || ${{ failure() }}) && (${{ steps.test_failure.outcome }} == 'failure')
run: |
echo "Validation failed as expected!"
exit 0
exit 0
test:
name: Test Valid
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Local Action
uses: ./
with:
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
target-dir: samples
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# quicktype-gha
# gha-valjean

A GitHub Action for generating type bindings from JSON schema files
A GitHub Action for validating JSON files against a remote schema

On the backend, this uses AJV to perform the validation

## Inputs

### `source-file`
### `schema-url`

Url to the remote schema JSON file to validate against

### `target-dir`

Comma-separated list directories to validate

### `all-errors` (optional)

Schema JSON file to generate type bindings from.
Enables 'all errors' validation on AJV

### `out-langs`
### `ajv-strict` (optional)

Comma-separated list of language extensions to generate bindings for
Enables 'strict mode' in AJV

### `out-dir` (optional)
### `draft-version` (optional)

Directory to output generated bindings to
The JSON schema draft version (defaults to 2019)—only supports '2020' and '2019'

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^1.10.1,",
"@actions/github": "^6.0.0",
"@vercel/ncc": "^0.38.1",
"ajv": "^8.16.0"
Expand Down
2 changes: 0 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import * as fs from "fs";
import Ajv2019 from "ajv"
import Ajv2020 from 'ajv/dist/2020'



/**
* The main function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
Expand Down

0 comments on commit 4be2ab9

Please sign in to comment.