[Blueprints] Publish v2 in the Blueprint schema - #3999
Merged
Conversation
adamziel
force-pushed
the
blueprint-v2-public-schema
branch
from
July 10, 2026 12:07
56ca68f to
fd24f98
Compare
adamziel
force-pushed
the
blueprint-v2-public-schema
branch
from
July 10, 2026 13:02
a9f04fd to
bb7fd7d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Publishes Blueprint v2 support end-to-end by updating the public JSON schema and aligning the browser editor’s completion + validation behavior with the runtime’s versioned declaration rules.
Changes:
- Add version-aware schema branch selection for editor completion (v1 default, explicit
version: 2opts into v2). - Switch the editor linter to async, version-aware validation with improved JSON Pointer decoding for diagnostics ranges.
- Add/extend tests covering completion behavior, schema portability, and v2 validation dispatch.
Reviewed changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/jsonSchemaCompletion.ts | Selects v1/v2 schema branch up-front and improves discriminator + const insertion for completion. |
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/jsonSchemaCompletion.spec.ts | Adds completion tests for v1 default, v2 opt-in, discriminator insertion, and published schema coverage. |
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/json-schema-utils.ts | Adds helper to read root properties from incomplete JSON and improves $ref chain resolution. |
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/json-schema-utils.spec.ts | Adds tests for chained $ref resolution and root property reads on incomplete documents. |
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/blueprint-linter.ts | Makes linting async via validateBlueprintDeclaration and fixes JSON Pointer decoding for accurate highlights. |
| packages/playground/website/src/components/blueprint-editor/json-schema-editor/blueprint-linter.spec.ts | Adds tests for v1/v2 lint acceptance and precise error highlighting using JSON Pointer edge cases. |
| packages/playground/blueprints/src/tests/schema/public-schema.spec.ts | Verifies published schema v1/v2 root, portable URL constraint, and consistency with dedicated v2 validator. |
| packages/playground/blueprints/src/lib/validate-blueprint-declaration.ts | Introduces async dispatcher that lazily loads v2 validation only for explicit version: 2. |
| packages/playground/blueprints/src/lib/v2/validate-blueprint-v2.ts | Exposes an AJV-error-oriented v2 declaration validator and adapts existing v2 validation API to it. |
| packages/playground/blueprints/src/index.ts | Re-exports validateBlueprintDeclaration as a public API. |
| packages/playground/blueprints/public/schema-readme.md | Documents the split between v1 validator and separate v2 validator artifact. |
| packages/playground/blueprints/public/blueprint-v2-schema-validator.js | Updates generated v2 validator artifact to match the newly published schema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blueprint v2 already ran, but
blueprint-schema.jsonand the browser editor only understood v1. A valid v2 Blueprint could therefore run while the editor marked it invalid and offered v1 fields.This publishes one schema for both declaration versions, adds lazy version-aware validation, and makes completion follow an explicit numeric
version: 2. String discriminators remain choices instead of silently selecting the first branch, nested WXR fields complete correctly, and JSON Pointer diagnostics highlight the actual invalid value.The existing v1 validator remains byte-for-byte unchanged. The v2 validator stays in a separate dynamic chunk, so ordinary Playground loads do not fetch it.