Repository navigation
fix(ack): keep empty-string member keys in error paths - #260
Merged
Merged
Conversation
Wrapper contexts used an empty pathSegment to mean "no segment", which also dropped a real member key of "". Mark those wrappers separately so an empty key is reported as the JSON Pointer #/. Fixes #223 Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
The empty-string member key note was filed under the published 2.0.0-beta.3 section. Published changelog sections stay immutable, so the note now starts an Unreleased Fixed section.
leoafarias
marked this pull request as ready for review
November 6, 2026 14:08
…ey-path-af66 Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
Move the empty-string path note into Unreleased beside the reference-cycle fix from main, and leave the released 2.0.0-beta.3 section unchanged. Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com>
…6' into cursor/empty-member-key-path-af66 Co-authored-by: Leo Farias <leoafarias@users.noreply.github.com> # Conflicts: # packages/ack/CHANGELOG.md
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.
Fixes #223
An error on a member whose key is
""was reported at the parent object.SchemaContext.pathskipped every emptypathSegment, and wrapper contexts (anyOf, lazy, boundary, discriminated object) used that same empty string to mean "no segment".Wrapper contexts now set
omitPathSegment, so a real empty member key stays in the JSON Pointer as#/(RFC 6901) and those wrappers still add no segment.The new test failed on main (
#instead of#/) and passes with this change, including the existing wrapper paths for anyOf, lazy, boundary, and discriminated objects.