fix: handle ref type when extracting blob paths from lexicon#6
Open
trezy wants to merge 1 commit intobigmoves:mainfrom
Open
fix: handle ref type when extracting blob paths from lexicon#6trezy wants to merge 1 commit intobigmoves:mainfrom
trezy wants to merge 1 commit intobigmoves:mainfrom
Conversation
5c98896 to
1ae25a7
Compare
When array items have `"type": "ref"` pointing to another definition
(like `#mediaItem`), the blob path extraction was not following the
reference to find blob fields inside the referenced definition.
This caused blob inputs to not be transformed to the proper AT Protocol
format (`$type: "blob"`, `ref: { $link: "cid" }`), resulting in blobs
that couldn't be retrieved from the PDS.
The fix adds:
- `resolve_ref_properties` function to resolve both local refs (#defName)
and external refs (nsid#defName) to their property definitions
- Handling for "ref" type in array items in `extract_blob_paths_from_properties`
- Passing lexicon context through the recursive extraction
1ae25a7 to
87779c4
Compare
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 blob transformation for array items that use
"type": "ref"to reference other definitions (like#mediaItem).Previously, blobs inside referenced definitions weren't detected, so they weren't transformed to the proper AT Protocol format (
$type: "blob",ref: { $link: "cid" }). This caused blobs to appear to upload successfully but fail to retrieve from the PDS.