PHPackages                             parisek/acf-json-schema - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. parisek/acf-json-schema

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

parisek/acf-json-schema
=======================

JSON Schema bundle for Advanced Custom Fields JSON exports (field groups, CPT, taxonomy, blocks). Targets ACF Pro 6.8.x.

v0.5.0(1mo ago)049↓51.9%[2 issues](https://github.com/parisek/acf-json-schema/issues)GPL-3.0-or-laterPHPPHP ^8.3CI passing

Since May 28Pushed 1w agoCompare

[ Source](https://github.com/parisek/acf-json-schema)[ Packagist](https://packagist.org/packages/parisek/acf-json-schema)[ Docs](https://github.com/parisek/acf-json-schema)[ RSS](/packages/parisek-acf-json-schema/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (12)Versions (11)Used By (0)

parisek/acf-json-schema
=======================

[](#parisekacf-json-schema)

[![Packagist Version](https://camo.githubusercontent.com/5db78a6640207909c6623a0fb37fdcb9f62d07ace347450acbb7c65d3c456372/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061726973656b2f6163662d6a736f6e2d736368656d612e737667)](https://packagist.org/packages/parisek/acf-json-schema)[![PHP Version](https://camo.githubusercontent.com/b98ca7e81de8ebd5b5cdd01c2c433f69001e3fc7a9a3c8912157806351343db4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7061726973656b2f6163662d6a736f6e2d736368656d612e737667)](https://packagist.org/packages/parisek/acf-json-schema)[![ACF Pro](https://camo.githubusercontent.com/82d486ae0794920f3498bd809b0ce6fb07e99821d71920aac3477cc2411b2970/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4143465f50726f2d362e382e782d626c75652e737667)](https://www.advancedcustomfields.com/pro/)[![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)[![License](https://camo.githubusercontent.com/03febc991e2caa511054ea0a5344fa954c50218fcedf6a5d4b629fc0783128ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7061726973656b2f6163662d6a736f6e2d736368656d612e737667)](LICENSE)

JSON Schema bundle for [Advanced Custom Fields](https://www.advancedcustomfields.com/) JSON exports — field groups (`acf.json`), Custom Post Types (`.json`), Taxonomies (`.json`), and ACF Blocks (`block.json`).

**Target:** ACF Pro 6.8.x. Free edition partially supported (field-group + field-type schemas only).

**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.

What this is
------------

[](#what-this-is)

Comprehensive 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.

Use case: lint your project's ACF JSON files in CI. Catch typos, type drift, and shape regressions before they ship to production.

Install
-------

[](#install)

```
composer require --dev parisek/acf-json-schema
```

Point your Ajv-based JSON validator at `vendor/parisek/acf-json-schema/schemas/`:

```
import path from "node:path";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const pkgPath = require.resolve("parisek/acf-json-schema/composer.json");
const SCHEMAS_ROOT = path.join(path.dirname(pkgPath), "schemas");
```

Load `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.

Bundled schemas
---------------

[](#bundled-schemas)

FileValidates`schemas/acf.schema.json`ACF Field Group JSON — discriminates on `type` to per-field-type refs`schemas/block.schema.json`ACF Block JSON (block.json with `acf` section)`schemas/cpt.schema.json`ACF Custom Post Type JSON (Pro 6.2+ JSON-Sync)`schemas/taxonomy.schema.json`ACF Taxonomy JSON (Pro 6.2+ JSON-Sync)`schemas/refs/field-.schema.json`Per-field-type closed-shape constraints (35 stable + `icon_picker` new in 6.8)`schemas/refs/{field,icon,location-rule,permalink-rewrite}.schema.json`Shared utility refs(`_meta.json` carries generator provenance — ACF version, timestamp — and is intentionally not part of the canonical schemas.)

Linting your project's ACF JSON (PHP)
-------------------------------------

[](#linting-your-projects-acf-json-php)

```
composer require --dev parisek/acf-json-schema
vendor/bin/acf-lint --strict path/to/templates path/to/blocks
```

`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.

FlagEffect`--strict`Exit non-zero on any finding (CI gate).`--fix`Bump stale/missing `modified` timestamps.`--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.`--format=``text` (default; findings on stderr, summary on stdout), `json` (one machine-readable document on stdout), or `github` (GitHub Actions `::error` annotations — findings appear inline on the PR diff).`--max-errors=`Cap schema errors collected per file (default 50).Text output is colored only on a TTY; set `NO_COLOR` to force plain output. Example CI step with inline PR annotations:

```
- run: vendor/bin/acf-lint --strict --format=github static/templates
```

For maintainers
---------------

[](#for-maintainers)

Regenerate / verify schemas against a live WP+ACF Pro install:

```
ddev exec "php vendor/bin/acf-schema-gen --wp-root /var/www/html --output /tmp/acf-schemas-out/"
diff -r /tmp/acf-schemas-out/ vendor/parisek/acf-json-schema/schemas/
```

See [`RELEASING.md`](RELEASING.md) for the full release flow.

License
-------

[](#license)

GPL-3.0-or-later

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f60a7484412a046d60bd8de9c5fb773cd9d59f00a1b455284fa718b786a4d93?d=identicon)[parisek](/maintainers/parisek)

---

Top Contributors

[![parisek](https://avatars.githubusercontent.com/u/10908003?v=4)](https://github.com/parisek "parisek (51 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

json-schemawordpresslintacfadvanced custom fields

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/parisek-acf-json-schema/health.svg)

```
[![Health](https://phpackages.com/badges/parisek-acf-json-schema/health.svg)](https://phpackages.com/packages/parisek-acf-json-schema)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k57](/packages/friendsoftypo3-content-blocks)[hellonico/acf-country

A country field for ACF.

12196.8k](/packages/hellonico-acf-country)[v.chetkov/php-clean-architecture

PHP Clean Architecture

14661.3k](/packages/vchetkov-php-clean-architecture)[boundwize/structarmed

Configurable PHP architecture guards — define your layers and rules, then keep them enforced

45629.2k26](/packages/boundwize-structarmed)[folbert/fewbricks

Write code to create fields and more for Advanced Custom Fields

1196.0k](/packages/folbert-fewbricks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
