{"id":50381264,"url":"https://github.com/parisek/acf-json-schema","last_synced_at":"2026-06-04T17:00:45.693Z","repository":{"id":361135870,"uuid":"1253066915","full_name":"parisek/acf-json-schema","owner":"parisek","description":"JSON Schema bundle for ACF Pro JSON exports — field groups, CPTs, taxonomies, blocks. Targets ACF Pro 6.8.x.","archived":false,"fork":false,"pushed_at":"2026-06-01T16:23:08.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T15:28:32.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/parisek/acf-json-schema","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parisek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-29T06:01:09.000Z","updated_at":"2026-06-01T16:30:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/parisek/acf-json-schema","commit_stats":null,"previous_names":["parisek/acf-json-schema"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/parisek/acf-json-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Facf-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Facf-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Facf-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Facf-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parisek","download_url":"https://codeload.github.com/parisek/acf-json-schema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Facf-json-schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33872298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T12:02:17.366Z","updated_at":"2026-06-03T16:00:39.256Z","avatar_url":"https://github.com/parisek.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parisek/acf-json-schema\n\n[![Packagist Version](https://img.shields.io/packagist/v/parisek/acf-json-schema.svg)](https://packagist.org/packages/parisek/acf-json-schema)\n[![PHP Version](https://img.shields.io/packagist/php-v/parisek/acf-json-schema.svg)](https://packagist.org/packages/parisek/acf-json-schema)\n[![ACF Pro](https://img.shields.io/badge/ACF_Pro-6.8.x-blue.svg)](https://www.advancedcustomfields.com/pro/)\n[![Tests](https://github.com/parisek/acf-json-schema/actions/workflows/test.yml/badge.svg)](https://github.com/parisek/acf-json-schema/actions/workflows/test.yml)\n[![License](https://img.shields.io/packagist/l/parisek/acf-json-schema.svg)](LICENSE)\n\nJSON Schema bundle for [Advanced Custom Fields](https://www.advancedcustomfields.com/) JSON exports — field groups (`acf.json`), Custom Post Types (`\u003ccpt\u003e.json`), Taxonomies (`\u003ctax\u003e.json`), and ACF Blocks (`block.json`).\n\n**Target:** ACF Pro 6.8.x. Free edition partially supported (field-group + field-type schemas only).\n\n**Generated against:** ACF Pro 6.8.2 · WPML 4.9.4 · ACFML 2.2.4 — the live install the canonical schemas were curated and snapshot-tested against.\n\n## What this is\n\nComprehensive JSON Schema (draft 2020-12) coverage for every JSON file the ACF Pro Admin Sync UI emits. Schemas are hand-curated against a live WP + ACF Pro + WPML install — the generator (`bin/acf-schema-gen`) reproduces the canonical baseline, and a snapshot test asserts byte-equality on every CI run. WPML/ACFML keys (e.g. `acfml_field_group_mode`, `wpml_cf_preferences`) are optional, so plain ACF (non-WPML) exports validate too.\n\nUse case: lint your project's ACF JSON files in CI. Catch typos, type drift, and shape regressions before they ship to production.\n\n## Install\n\n```bash\ncomposer require --dev parisek/acf-json-schema\n```\n\nPoint your Ajv-based JSON validator at `vendor/parisek/acf-json-schema/schemas/`:\n\n```js\nimport path from \"node:path\";\nimport { createRequire } from \"node:module\";\nconst require = createRequire(import.meta.url);\nconst pkgPath = require.resolve(\"parisek/acf-json-schema/composer.json\");\nconst SCHEMAS_ROOT = path.join(path.dirname(pkgPath), \"schemas\");\n```\n\nLoad `acf.schema.json`, `block.schema.json`, `cpt.schema.json`, or `taxonomy.schema.json` from `SCHEMAS_ROOT`, register the `refs/` directory, and validate your project's ACF JSON files against them.\n\n## Bundled schemas\n\n| File | Validates |\n|---|---|\n| `schemas/acf.schema.json` | ACF Field Group JSON — discriminates on `type` to per-field-type refs |\n| `schemas/block.schema.json` | ACF Block JSON (block.json with `acf` section) |\n| `schemas/cpt.schema.json` | ACF Custom Post Type JSON (Pro 6.2+ JSON-Sync) |\n| `schemas/taxonomy.schema.json` | ACF Taxonomy JSON (Pro 6.2+ JSON-Sync) |\n| `schemas/refs/field-\u003c36 types\u003e.schema.json` | Per-field-type closed-shape constraints (35 stable + `icon_picker` new in 6.8) |\n| `schemas/refs/{field,icon,location-rule,permalink-rewrite}.schema.json` | Shared utility refs |\n\n(`_meta.json` carries generator provenance — ACF version, timestamp — and is intentionally not part of the canonical schemas.)\n\n## Linting your project's ACF JSON (PHP)\n\n```bash\ncomposer require --dev parisek/acf-json-schema\nvendor/bin/acf-lint --strict path/to/templates path/to/blocks\n```\n\n`acf-lint` walks the given files/dirs, dispatches each JSON to the right bundled schema (block / acf / cpt / taxonomy), and reports findings. Files of an unrecognized shape are skipped.\n\n| Flag | Effect |\n|---|---|\n| `--strict` | Exit non-zero on any finding (CI gate). |\n| `--fix` | Bump stale/missing `modified` timestamps. |\n| `--wpml` | Require WPML/ACFML translation keys to be **present**: `acfml_field_group_mode` on each field group and `wpml_cf_preferences` on every value-holding field (recurses into repeater/group/flexible-content; `tab`/`message`/`accordion` are exempt). Opt-in — the schemas keep these keys optional so non-WPML projects are unaffected. |\n\n## For maintainers\n\nRegenerate / verify schemas against a live WP+ACF Pro install:\n\n```bash\nddev exec \"php vendor/bin/acf-schema-gen --wp-root /var/www/html --output /tmp/acf-schemas-out/\"\ndiff -r /tmp/acf-schemas-out/ vendor/parisek/acf-json-schema/schemas/\n```\n\nSee [`RELEASING.md`](RELEASING.md) for the full release flow.\n\n## License\n\nGPL-3.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisek%2Facf-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparisek%2Facf-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisek%2Facf-json-schema/lists"}