Skip to content

feat: Check in schema & add sync script#178

Merged
bsmth merged 5 commits into
mozilla:mainfrom
bsmth:check-in-schema
Jun 12, 2026
Merged

feat: Check in schema & add sync script#178
bsmth merged 5 commits into
mozilla:mainfrom
bsmth:check-in-schema

Conversation

@bsmth

@bsmth bsmth commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description:

Check in the upstream schema and add a script to write it to the repo. Additional automations incoming (cron, PR on diffs). Details in #177

Motivation:

The docs will benefit from a local source of truth for policy definitions. Checking it in makes the schema reviewable & easier to author checks.

Additions:

  • schema/policies-schema.json: The upstream schema file
  • schema/.source.json: A meta file showing URL & SHA of the schema file
  • scripts/sync-schema.mjs: A small utility to fetch & write the schema to this repo
  • .prettierignore excludes schema/: stop the formatter from changing the file

Changes:

  • package.json: wire in the fetch script via schema:sync

Testing:

To test, run:

npm run schema:sync

Expected result:

tree -a schema
# schema
# ├── .source.json
# └── policies-schema.json

Related issues and pull requests:

Part of #177

@bsmth bsmth merged commit 7c11bc7 into mozilla:main Jun 12, 2026
1 check passed
@bsmth bsmth deleted the check-in-schema branch June 12, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant