Configuration

1. Command line

Flag Description Default Example

--help

Show usage help

N/A

--help

--files

Array of file paths to validate against the schema. Can contain both YAML and JSON files. Positional args also supported.

N/A

--files=app.yaml or "app.yaml,config.json"

--schema

Path to the JSON schema in either JSON or YAML file format used for validation as a fallback. Can be either a local file path or URL.

Embedded $schema in file

--schema=schema.json or --schema=https://example.com/schema.json

--schema-override

Override $schema from the file with the provided --schema.

false

--schema-override=true

--report-type

Validation report type: text, json, yaml, junit(alpha)

text

--report-type=junit

--report-file-name

Output file for non-console reports

stdout

--report-file-name=validation.json

--color

Enable/disable colored output

true

--color=false

--http-timeout

Timeout (seconds) for remote schema fetches

10

--http-timeout=30

--ignore-ssl-errors

Skip SSL certificate validation for HTTPS schemas

false

--ignore-ssl-errors

2. Config file

Same options can be used in a config file yj-schema-validator.yaml

Schema files for config files:

Example config file

$schema: "https://www.alexmond.org/yj-schema-validator/current/yj-schema-validator-config.yaml"
#logging:
#  level:
#    root: error
#    org.alexmond: debug

files:
  - ./.github/workflows/maven.yml
  - ./.github/workflows/maven_release.yml

schema: https://json.schemastore.org/github-workflow.json
schema-override: false
report-type: text
color: false
report-file-name: report.txt
http-timeout: 10s
is-ignore-ssl-errors: false

3. Troubleshooting

Issue Cause Solution

"No schema found"

Missing --schema

Provide via flag or embed in file.

YAML parse error

Invalid syntax

Check line/col in error; use --color=false for plain text.

HTTP timeout

Slow remote schema

Increase --http-timeout=30.

JUnit alpha issues

Experimental

Report bugs; fallback to JSON.

For SSL issues: Use --ignore-ssl-errors (not recommended for production).