Repository navigation
Share JSON Schema compilation across validation paths - #16281
Merged
Merged
Conversation
Co-authored-by: lpcox <[email protected]>
Copilot
AI
changed the title
[WIP] Review Go module santhosh-tekuri/jsonschema/v6
Share JSON Schema compilation across validation paths
Nov 10, 2026
lpcox
marked this pull request as ready for review
November 10, 2026 16:56
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the shared JSON Schema compilation refactor.
No open issues 🎉
What changed in this PR
Consolidates JSON Schema compilation for embedded and custom configuration validation, addressing the duplication noted in #16264 without changing the dependency version.
Changes:
- Adds a shared helper for resource registration and schema compilation.
- Preserves custom-schema registration under both the fetch URL and
$idwhen they differ. - Retains caller-specific error messages by distinguishing registration failures from compilation failures.
| File | Description |
|---|---|
internal/config/validation_server.go |
Uses the shared helper for custom schemas while preserving resource aliases and error context. |
internal/config/validation_schema.go |
Defines the shared helper and error wrapper, and uses them for cached embedded-schema compilation. |
Review effort: Balanced (auto)
This was referenced Nov 10, 2026
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.
The repository already uses
jsonschema/v6v6.0.3, the reviewed latest release, with an upgrade canary in place. This change consolidates the embedded and custom-schema compilation paths.$idwhen they differ; callers retain their specific error context.