Repository navigation
V4: a $ref whose pointer reaches into an embedded resource enters only that resource - #1057
Merged
Merged
Conversation
…y that resource For "$ref": "bar#/$defs/item", where item has its own $id, the reference resolution pushed a scope with item's location but bar's located schema (or, when the pointer was already registered, bar's location and schema). The dynamic-anchor lookup walks the located schemas on the scope stack, so a $dynamicRef inside item found bar's $dynamicAnchor and validated against the wrong schema. The standard, dynamic and recursive reference paths now take the located schema of the resource the reference landed in, and a pointer that was already registered is re-based on the innermost resource it passes through. The JSON-Schema-Test-Suite's optional draft 2020-12 test "$dynamicRef skips over intermediate resources - pointer reference across resource boundary" is no longer excluded: it failed both cases before the fix and passes after it. The V4 test generator skips a file that is not a test array (such as issue957-swagger.json), which made it crash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3
Contributor
Code Coverage Summary Report - Linux (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.6%
Corvus.Json.CodeGeneration.CSharp - 83.5%
Corvus.Json.ExtendedTypes - 81.1%
Corvus.Json.JsonReference - 76.4%
Corvus.Text.Json - 91.9%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.8%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
Contributor
Contributor
Code Coverage Summary Report - Windows (net10.0)Summary
CoverageCorvus.Json.CodeGeneration - 80.6%
Corvus.Json.CodeGeneration.CSharp - 83.5%
Corvus.Json.ExtendedTypes - 81.1%
Corvus.Json.JsonReference - 76.6%
Corvus.Text.Json - 91.8%
Corvus.Text.Json.AsyncApi - 71%
Corvus.Text.Json.AsyncApi.Amqp - 0.2%
Corvus.Text.Json.AsyncApi.AzureServiceBus - 0%
Corvus.Text.Json.AsyncApi.CodeGeneration - 93.5%
Corvus.Text.Json.AsyncApi.Kafka - 0.2%
Corvus.Text.Json.AsyncApi.Mqtt - 0.4%
Corvus.Text.Json.AsyncApi.Nats - 0.2%
Corvus.Text.Json.AsyncApi.Polly - 57.8%
Corvus.Text.Json.AsyncApi.Testing - 96.2%
Corvus.Text.Json.AsyncApi.WebSocket - 0.6%
Corvus.Text.Json.CodeGeneration - 89.8%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.6%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.5%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 94.7%
|
Contributor
Code Coverage Summary Report - Windows (net481)Summary
CoverageCorvus.Json.CodeGeneration - 78.9%
Corvus.Json.CodeGeneration.CSharp - 83.2%
Corvus.Json.ExtendedTypes - 79.3%
Corvus.Json.JsonReference - 73.6%
Corvus.Text.Json - 91%
Corvus.Text.Json.CodeGeneration - 64.3%
Corvus.Text.Json.JMESPath - 93.8%
Corvus.Text.Json.JMESPath.CodeGeneration - 97.7%
Corvus.Text.Json.Jsonata - 91.8%
Corvus.Text.Json.Jsonata.CodeGeneration - 88.6%
Corvus.Text.Json.JsonLogic - 95.1%
Corvus.Text.Json.JsonLogic.CodeGeneration - 92.8%
Corvus.Text.Json.JsonPath - 95%
Corvus.Text.Json.JsonPath.CodeGeneration - 96.1%
Corvus.Text.Json.Patch - 96.6%
Corvus.Text.Json.Toon - 88.2%
Corvus.Text.Json.Validator - 93.7%
Corvus.Text.Json.Yaml - 90.8%
Corvus.Toon.SystemTextJson - 90%
|
Contributor
|
The documentation preview for this pull request has been removed. |
This was referenced Nov 8, 2026
Merged
mwadams
added a commit
that referenced
this pull request
Nov 11, 2026
…1057) #1057 fixed the V4 dynamic scope for a $ref whose pointer reaches into an embedded resource, so the optional 2020-12 case is no longer excluded. The rebase also merged #1057's "skip a file that is not a test array" into the generator ahead of this branch's own check, which skipped every unified file (an object); the duplicate is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3
mwadams
added a commit
that referenced
this pull request
Nov 12, 2026
…#1058) * WIP: run every .NET suite runner on the unified JSON-Schema-Test-Suite layout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Exclude the leap-second cases (V5 and V4) and the V4 high-precision bignum cases by name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Regenerate V4 suite tests after the exclusions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Rust and Go suite runners on the unified JSON-Schema-Test-Suite layout Each case's compatibility selects the drafts it applies to, its tags whether format is asserted, and its externalSchemas are served to that case alone. Rust leaves out, by name, the six contradictory required leap-second cases and the high-precision bignum cases its serde_json values cannot hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Rust annotation, C API and Bowtie runners on the unified layout The C API runner leaves out the same cases as the crate's. The Bowtie IHOP test sends each case's externalSchemas as its registry and leaves out the format-assertion cases, since the harness treats format as an annotation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Go regular expression and Bowtie runners on the unified layout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Java suite, annotation, regular expression and Bowtie runners on the unified layout The suite runner expects 8,611 cases (less zero-terminated floats in draft4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Julia suite, annotation, regular expression and Bowtie runners on the unified layout The suite runner expects 8,611 cases (less zero-terminated floats in draft4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the TypeScript suite, annotation and Bowtie runners on the unified layout The suite runner leaves out, by name, the six contradictory required leap-second cases and the high-precision bignum cases, whose digits JavaScript numbers do not hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Python suite and annotation runners on the unified layout Both evaluators take Python values, so the suite runner leaves out, by name, the high-precision bignum cases whose digits a float does not hold (and, for the Rust-backed one, the integer beyond 64 bits). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the PHP suite runner on the unified layout As the crate's runner, it leaves out by name the high-precision bignum cases, whose digits PHP numbers and serde_json values do not hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Ruby suite runner on the unified layout As the crate's runner, it leaves out by name the high-precision bignum cases, whose digits serde_json values do not hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the R suite runner on the unified layout As the crate's runner, it leaves out by name the high-precision bignum cases, whose digits R's doubles and serde_json values do not hold. It passes once the package is built on crate 0.2.1 (checked locally with the crate patched in); on the crates.io 0.1.7 it pins, the format cases the crate fixed in 0.2.1 fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Pascal suite, compile, results, format and regular expression programs on the unified layout SuiteCommon.inc serves each case's externalSchemas and reads its compatibility and tags, and TestCompileSuite now includes it. The suite program expects 8,611 cases (less zero-terminated floats in draft4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Perl suite and annotation tests on the unified layout Both distributions leave out by name the high-precision bignum cases: the pure evaluator reads a number with a fraction as a double, and the XS one reads JSON through the C library's serde_json values; the Perl data comes from JSON::PP, which reads 2^64 as a double even with allow_bignum. The XS tests pass once Alien::CorvusJsonSchema takes C library 0.1.6, which has the format fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the OCaml suite, annotation, format and regular expression tests on the unified layout The suite runner expects 8,611 cases (less zero-terminated floats in draft4); OCaml compares numbers exactly, so no bignum case is left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the Fortran suite and annotation tests on the unified layout As the C library's other runners, the suite test leaves out by name the high-precision bignum cases. It passes once CI downloads C library 0.1.6, the release with the format fixes (checked here with the library built from this branch). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Regenerate the V5 suite tests after the leap-second exclusions The exclusions were in the generator's appsettings.json, but the generated V5 tests still held the 28 cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Docs: the suite's unified layout, the new counts and the bignum exclusions The conformance lines name the files left out (zero-terminated-floats.json, and the high-precision bignum cases for the engines whose values or serde_json numbers do not hold the digits), the skills and RunningTests.md describe the unified layout and the generator's settings, and the Bowtie READMEs the per-case registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Pin the JSON-Schema-Test-Suite to the final unify branch (6a23a51) The suite resolved our issue #1258 (json-schema-org/JSON-Schema-Test-Suite#1259): the required time tests expect a leap second to be refused for v1 only, so the six required leap-second cases the Rust, C library and TypeScript runners left out by name now run and pass. The new cases (formats, multipleOf, bignum) pass in every engine but three high-precision uniqueItems cases, which the engines that hold numbers as doubles (and V4) leave out by name, as they do the other bignum cases. The .NET suites are regenerated, and the counts in the runners and documents are the new ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * V4: run the cross-resource $dynamicRef case now that V4 handles it (#1057) #1057 fixed the V4 dynamic scope for a $ref whose pointer reaches into an embedded resource, so the optional 2020-12 case is no longer excluded. The rebase also merged #1057's "skip a file that is not a test array" into the generator ahead of this branch's own check, which skipped every unified file (an object); the duplicate is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Run the leap-second cases in every engine that has the rule .NET (V5 and V4), Rust and its C library, Go, R, Fortran and Perl XS now give a leap second the published rule, so their runners no longer leave the leap-second cases out: the generator configurations drop their 61 named exclusions, the runtime evaluator's runner its leap filter, and the .NET suite tests are regenerated. Java, Julia, OCaml, Pascal, pure Perl and pure Python still skip them until each engine has the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 * Code-sample catalog after the rebase Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3 --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 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.
V4 code generation put the wrong resource into the dynamic scope when a
$refpointer reached into an embedded resource, so a$dynamicRefcould validate against the wrong schema. This fixes it, and ships as V5.8.5.The bug
For
"$ref": "bar#/$defs/item", whereitemhas its own$id, the reference lands in theitemresource. The reference resolution insrc-v4/.../References/References.cspushed a scope withitem's location butbar's located schema (or, when the pointer was already registered,bar's location and schema). The dynamic-anchor lookup reads the located schemas on the scope stack, so a$dynamicRefinsideitemfound the$dynamicAnchorthat onlybardeclares.The fix
Tests
additional-test-schemas/draft4/issue957-swagger.json, which is a schema rather than a test array (since Fix #957: schema locations in generated types, V4 file-relative again and V5 consistent with SchemaDocument (5.5.5) #958). It now skips such files, as the unified-suite migration branch does. The generator's template has drifted from the committed V4 tests (boilerplate only, 370 files); this PR adds only the new test file and leaves the others alone.VERSIONHISTORY has a V5.8.5 entry.
🤖 Generated with Claude Code
https://claude.ai/code/session_011rjLiHWYWRFfJb3dkSsnE3