{
  "id": 4804290,
  "title": "GSoC'26_Week14 : Schema, AJV & the Final Stretch",
  "url": "https://urgent.news/2026/09/01/gsoc26-week14-schema-ajv-the-final-stretch",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-01T06:27:06.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/harkeerat24/gsoc26week14-schema-ajv-the-final-stretch-7kg"
  },
  "original_language": "en",
  "account": "During the 14th week of my Google Summer of Code (GSoC) project with CircuitVerse, I tackled the final major components of my work. In the first part of the week, I continued refining the JSON Schema, which defines the valid structure of a Canonical v1 project. I utilized the `ts-json-schema-generator` tool to create an initial schema from TypeScript types, but had to modify it to align with the actual workings of Canonical v1. This involved splitting common structures into reusable definitions, adding stricter rules for components and nets, and ensuring numeric ranges, enum values, and extra properties were properly handled.\n\nOnce satisfied with the final schema, I submitted PR #1236, which incorporated the Canonical v1 schema. As soon as my schema PR was approved, I shifted my focus to implementing runtime validation using Ajv (Another JSON Schema Validator). The first validation pass checks the incoming JSON data against the schema, ensuring that expected fields exist, values have the correct types, IDs match required formats, and unsupported properties are rejected. However, I realized that a JSON Schema alone couldn't catch all potential errors, such as a net containing a valid component ID that doesn't exist in the same circuit.\n\nTo address this, I added a second cross-reference validation pass using Ajv. This additional validation checks if the focused circuit and tab order only reference existing circuits, subcircuit components point to existing circuits, and routing data refers to valid nets and intermediate nodes. The validation errors now include useful JSON paths, allowing the importer to pinpoint the exact location of the problem. Before proceeding with any modifications, importCanonical() now accepts the incoming data as `unknown` and only modifies the project once validation has successfully passed. The layout remains optional, as a project without layout data is still considered valid. This week also included compatibility details like normalizing older timePeriod values into valid numbers before canonical export.\n\nIn summary, the final week of my GSoC project will involve addressing any remaining reviews, polishing the work, and writing the final project report to complete the summer's tasks.",
  "summary": "Week 14 of my Google Summer of Code journey with CircuitVerse (August 24th to August 30th) started on a really good note. Aboo had merged both of my stacked PRs late on Sunday, so I came into Monday with the Editor's Picks round-trip fixes and ELK Auto Layout both finally in! 🎉 After spending the last few weeks testing and strengthening the pipeline, it felt really good to see those pieces land.…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}