scedel/validator

JSON validator for Scedel schema repositories

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/scedel/validator

0.2.1 2026-02-18 16:30 UTC

This package is auto-updated.

Last update: 2026-02-18 16:45:19 UTC


README

logo

Validates JSON payloads against a SchemaRepository from scedel/schema.

RFC support

API

use Scedel\Validator\JsonValidator;

$validator = new JsonValidator();
$errors = $validator->validate($json, $repository, 'Root');

validate() returns ValidationError[].

CLI

php scedel-validator/bin/validate-json.php '<json>' /absolute/path/schema.scedel
php scedel-validator/bin/validate-json.php --type Post payload.json /absolute/path/schema.scedel

If root type is omitted, validator uses:

  1. Root type, if present
  2. the only type in repository
  3. otherwise returns an error with available types.