Skip to content

Commit 4b4145e

Browse files
Copilotlpcox
andauthored
docs: document JSON Schema versioning and release tag pinning in releasing.md
Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/72cdaa37-37d8-4564-937b-e5f2ee8eafc1 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent bafaae2 commit 4b4145e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/releasing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The workflow will:
3131
- Build and push Docker images to GHCR
3232
- Create Linux x64 and arm64 binaries
3333
- Create NPM tarball and checksums
34+
- Generate versioned JSON Schema files with the release tag embedded in their `$id` URLs
3435
- Publish the GitHub Release with auto-generated changelog
3536

3637
### 2. Verify Release
@@ -43,6 +44,7 @@ Once the workflow completes:
4344
- Linux arm64 binary (`awf-linux-arm64`)
4445
- NPM tarball (`awf.tgz`)
4546
- Checksums file (`checksums.txt`)
47+
- JSON Schema files (`awf-config.schema.json`, `awf-config.v1.schema.json`)
4648
- Installation instructions with GHCR image references
4749
3. Go to **Packages** page (in repository)
4850
4. Verify Docker images are published:
@@ -61,6 +63,25 @@ Each release includes:
6163
- `awf-linux-arm64` - Linux arm64 standalone executable
6264
- `awf.tgz` - NPM package tarball (alternative installation method)
6365
- `checksums.txt` - SHA256 checksums for all files
66+
- `awf-config.schema.json` - AWF config JSON Schema (latest alias, same content as `awf-config.v1.schema.json`)
67+
- `awf-config.v1.schema.json` - AWF config JSON Schema, version 1 (stable versioned copy)
68+
69+
### JSON Schema versioning
70+
71+
Each release generates the schema with a `$id` URL that includes the release tag, creating a stable, pinnable reference:
72+
73+
```
74+
https://github.com/github/gh-aw-firewall/releases/download/v0.23.1/awf-config.v1.schema.json
75+
```
76+
77+
The unversioned `awf-config.schema.json` asset is a copy of the v1 schema for convenience. External consumers (e.g. the gh-aw compiler) should pin to the versioned URL or the stable raw URL:
78+
79+
| Reference | URL |
80+
|-----------|-----|
81+
| Pinned to a specific release tag | `https://github.com/github/gh-aw-firewall/releases/download/<tag>/awf-config.v1.schema.json` |
82+
| Always-latest from `main` branch | `https://github.com/__raw/github/gh-aw-firewall/main/docs/awf-config.v1.schema.json` |
83+
84+
**Schema version bumping:** The schema version (`"version": "1"` in the schema body) must be incremented whenever breaking changes are made to the config surface (removed fields, changed types, stricter constraints). Non-breaking additions do not require a version bump. When the version is bumped (e.g. from `1``2`), a new file `awf-config.v2.schema.json` should be introduced in `docs/` and `scripts/generate-schema.mjs` updated accordingly.
6485

6586
### GitHub Container Registry (GHCR)
6687
Docker images are published to `ghcr.io/github/gh-aw-firewall`:

0 commit comments

Comments
 (0)