fix(cli): decode JSON Pointer escape sequences in AsyncAPI V3 parser#12051
Open
fern-support wants to merge 1 commit intomainfrom
Open
fix(cli): decode JSON Pointer escape sequences in AsyncAPI V3 parser#12051fern-support wants to merge 1 commit intomainfrom
fern-support wants to merge 1 commit intomainfrom
Conversation
Channel paths containing slashes (e.g., /api/v1/ws) are encoded as ~1 in JSON Pointer references per RFC 6901. The parser now correctly decodes ~1 to / and ~0 to ~ when resolving channel references, enabling proper parsing of AsyncAPI specs with URL-like channel paths. Co-Authored-By: blank@buildwithfern.com <blank@buildwithfern.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
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.
Description
Refs: Investigation for Smallest AI websocket generation issue
Fixes the AsyncAPI V3 parser to properly decode JSON Pointer escape sequences in channel references per RFC 6901.
When AsyncAPI specs have channel paths containing slashes (e.g.,
/api/v1/ws), these are encoded as~1in JSON Pointer$refvalues (e.g.,#/channels/~1api~1v1~1ws). The parser was not decoding these escape sequences, causing channel lookups to fail and AsyncAPI documents to be skipped during parsing.Changes Made
~1→/,~0→~) ingetChannelPathFromOperation()AsyncAPIV3ParserContext.resolveMessageReference()to properly extract and decode channel paths before lookupoperation.channelwith descriptive error messageTesting
pnpm run check)Human Review Checklist
~1before~0matters per RFC 6901)Link to Devin run: https://app.devin.ai/sessions/6edd55620e9c49c2a7edd190fe1e16d7
Requested by: @fern-support