scedel/validator

JSON validator for Scedel schema repositories

Maintainers

Package info

github.com/ScedelLang/php-scedel-validator

pkg:composer/scedel/validator

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.2.1 2026-02-18 16:30 UTC

This package is auto-updated.

Last update: 2026-03-18 17:01:48 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.