Configuration
1. Command line
| Flag | Description | Default | Example |
|---|---|---|---|
|
Show usage help |
N/A |
|
|
Array of file paths to validate against the schema. Can contain both YAML and JSON files. Positional args also supported. |
N/A |
|
|
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 |
|
|
Override |
|
|
|
Validation report type: |
|
|
|
Output file for non-console reports |
stdout |
|
|
Enable/disable colored output |
|
|
|
Timeout (seconds) for remote schema fetches |
10 |
|
|
Skip SSL certificate validation for HTTPS schemas |
|
|
2. Config file
Same options can be used in a config file yj-schema-validator.yaml
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 |
Provide via flag or embed in file. |
YAML parse error |
Invalid syntax |
Check line/col in error; use |
HTTP timeout |
Slow remote schema |
Increase |
JUnit alpha issues |
Experimental |
Report bugs; fallback to JSON. |
For SSL issues: Use --ignore-ssl-errors (not recommended for production).