Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

GSoC'26_Week14 : Schema, AJV & the Final Stretch

Описание и применение

Автор добавил двухступенчатую проверку Canonical v1 файлов в CircuitVerse: сначала проверка структуры через AJV, затем проверка ссылок внутри проекта, чтобы гарантировать корректность и согласованность данных.

Задача

Ensuring that Canonical v1 project files are structurally valid and internally consistent before importing into CircuitVerse.

Результат

The project now validates Canonical v1 files both structurally and semantically, preventing invalid imports and improving user experience.

Рабочий процесс

  • Generate initial JSON Schema from TypeScript types using ts-json-schema-generator
  • Refine schema: split reusable definitions, enforce stricter rules for IDs, names, types, ranges, and metadata
  • Create PR #1236 to add Canonical v1 schema to the project
  • Implement AJV validation to check JSON structure against the schema
  • Add cross‑reference validation pass to check references between circuits, components, nets, and routing data
  • Include JSON paths in validation errors for precise error localization
  • Ensure importCanonical() accepts unknown data and only mutates after successful validation
  • Make layout optional to allow auto‑generation by ELK Auto Layout
  • Normalize legacy timePeriod values
  • Create PR #1242 to add runtime validation to the codebase

Доказательства

I spent the rest of the time reshaping it to match how Canonical v1 actually works.

Источник

I added a second cross‑reference validation pass.

Источник

  • Дата записи: 2026-09-10T07:00:33.367Z