Parse and validate AT Protocol Lexicons with DTO generation for Laravel
at dev 630 B view raw
1<?php 2 3namespace SocialDept\AtpSchema\Contracts; 4 5use SocialDept\AtpSchema\Data\LexiconDocument; 6 7interface LexiconParser 8{ 9 /** 10 * Parse raw Lexicon JSON into structured objects. 11 */ 12 public function parse(string $json): LexiconDocument; 13 14 /** 15 * Parse Lexicon from array data. 16 */ 17 public function parseArray(array $data): LexiconDocument; 18 19 /** 20 * Validate Lexicon schema structure. 21 */ 22 public function validate(array $data): bool; 23 24 /** 25 * Resolve $ref references to other schemas. 26 */ 27 public function resolveReference(string $ref, LexiconDocument $context): mixed; 28}