You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d438c6
Browse filesBrowse the repository at this point in the historyBrowse files
fix: percent-encode keys in local reference pointers
The workspace registered keys escaped with only "~0" / "~1", while names recovered
from references were percent-decoded (RFC 6901 section 6). Keys containing "%" or
characters that are percent-encoded in a URI fragment did not round-trip:
- A 2.x server named "a%20b" was written back as "a b", and upgraded to a 3.x
"#/servers/a%20b" reference that points at a server named "a b".
- A 3.x "$ref: '#/servers/a%20b'" missed the workspace entry for "a b" and was
resolved from the raw document into a separate copy of the server.
The workspace now normalizes every location's fragment into one percent-encoded
form, so encoded and unencoded references find the same entry, and registrations
and the 2.x reader's references are built with JsonPointer.EscapeUriFragmentToken.
Registry keys are now compared as strings instead of Uris. Uri equality ignores
the fragment of absolute URIs, so "https://x/s.json#/A" and "https://x/s.json#/B"
shared an entry and the second reference silently resolved to the first schema.
Fixes#61
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments