A PHP schema validator for JSON, YAML, and XML files that can generate documentation and XSD files.
MetaYaml is a schema validation library for PHP that validates data structures defined in JSON, YAML, or XML against a unified schema. It enables developers to define complex data structures with type checking, required fields, patterns, and enumerations, ensuring data integrity across different file formats.
PHP developers working with multi-format data (JSON, YAML, XML) who need consistent validation, such as those building configuration systems, API data validators, or data import/export pipelines.
Developers choose MetaYaml for its format-agnostic validation, allowing a single schema to validate JSON, YAML, and XML data, plus features like automatic documentation generation and experimental XSD generation for XML.
A powerful schema validator!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validates JSON, YAML, and XML data against a unified schema, with loaders for each format, enabling consistent validation across different file types as shown in the basic usage examples.
Supports diverse node types like text, number, array, prototype, and choice, with attributes for required, not_empty, and strict validation, allowing complex data structure definitions.
Automatically generates human-readable documentation from schema descriptions and provides experimental XSD generation for XML, useful for team reference or external validation contexts.
Includes loaders for common formats and allows writing custom loaders via the LoaderInterface, making it adaptable to additional data sources.
XML validation enforces specific conventions, lacks namespace support, and XSD generation is experimental with limitations like unsupported choice nodes and prototype validation issues.
Schema validation can be slow, taking up to a second for complex schemas as noted in the README, which may hinder real-time or high-throughput applications.
Requires the Symfony Yaml component for YAML loading, adding an extra dependency that might complicate setup in minimal environments.