Skip to content

add cox module

add cox module #5

name: Validate JSON Files
on:
push:
paths:
- '**/*.json'
- '.github/workflows/validate-filter-schema.yaml'
pull_request:
paths:
- '**/*.json'
- '.github/workflows/validate-filter-schema.yaml'
jobs:
validate_filter_schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install check-jsonschema
run: pip install check-jsonschema
- name: Download Current Filter Schema
run: |
curl -o schema.json https://raw.githubusercontent.com/Kaqemeex/loot-filters-ui/refs/heads/main/schema.json
- name: print schema
run: cat schema.json
- name: Validate JSON files
run: |
find . -type f -name "*.json" -not -path "./schema.json" -print0 | while IFS= read -r -d '' file; do
echo "Validating $file..."
if ! check-jsonschema -v --schemafile schema.json "$file"; then
echo "❌ Validation failed for $file"
exit 1
fi
done