Skip to content

Commit b145431

Browse files
authored
feat: publish versioned JSON Schema for AWF config file
Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/67604e30-6b7e-4524-8572-239a489b0733
1 parent a42c828 commit b145431

7 files changed

Lines changed: 808 additions & 53 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,14 @@ jobs:
520520
echo "Generated containers.txt:"
521521
cat release/containers.txt
522522
523+
- name: Generate versioned JSON Schema
524+
run: |
525+
mkdir -p release
526+
node scripts/generate-schema.mjs --version ${{ needs.bump-version.outputs.version }}
527+
cp docs/awf-config.schema.json release/awf-config.schema.json
528+
echo "=== Schema preview (first 10 lines) ==="
529+
head -10 release/awf-config.schema.json
530+
523531
- name: Generate checksums
524532
run: |
525533
cd release
@@ -645,6 +653,7 @@ jobs:
645653
release/awf-bundle.js
646654
release/awf.tgz
647655
release/containers.txt
656+
release/awf-config.schema.json
648657
release/checksums.txt
649658
env:
650659
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The `--` separator divides firewall options from the command to run.
3434

3535
- [Quick start](docs/quickstart.md) — install, verify, and run your first command
3636
- [Usage guide](docs/usage.md) — CLI flags, domain allowlists, examples
37-
- [AWF config schema](docs/awf-config.schema.json) — machine-readable JSON Schema for JSON/YAML configs
37+
- [AWF config schema](docs/awf-config.schema.json) — machine-readable JSON Schema for JSON/YAML configs (also published as a [versioned release asset](https://github.com/github/gh-aw-firewall/releases/latest/download/awf-config.schema.json) for IDE autocomplete)
3838
- [AWF config spec](docs/awf-config-spec.md) — normative processing and precedence rules for tooling/compiler integration
3939
- [Enterprise configuration](docs/enterprise-configuration.md) — GitHub Enterprise Cloud and Server setup
4040
- [Chroot mode](docs/chroot-mode.md) — use host binaries with network isolation

docs/awf-config-spec.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This document defines the canonical configuration model for AWF (`awf`) and is i
1010

1111
The machine-readable schema is published at:
1212

13-
- `docs/awf-config.schema.json`
13+
- `docs/awf-config.schema.json` — live schema (always reflects latest `main`)
14+
- GitHub release asset `awf-config.schema.json` — versioned, stable URL per release
15+
(e.g. `https://github.com/github/gh-aw-firewall/releases/download/v0.23.1/awf-config.schema.json`)
1416

1517
## 1. Conformance
1618

0 commit comments

Comments
 (0)