Skip to content
This repository was archived by the owner on Dec 8, 2025. It is now read-only.

fix: issue with shared memory for updated yaml nodes#16

Merged
ThomasRooney merged 1 commit intomainfrom
fix/memory-corruption
May 9, 2025
Merged

fix: issue with shared memory for updated yaml nodes#16
ThomasRooney merged 1 commit intomainfrom
fix/memory-corruption

Conversation

@ThomasRooney
Copy link
Member

An overlay like:

overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
    title: example overlay
    version: 0.0.0
actions: 
  - target: $.paths.*.*
    update: 
      x-drop: true
  - target: $.paths.*[?@.operationId == 'findPetsByStatus']
    update:
      x-drop: false

Would previously re-use memory for x-drop: true across the document, which means that subsequent updates would affect all nodes.

This makes sure we clone the yaml node before inserting it into the document.

@ThomasRooney ThomasRooney merged commit 37ca848 into main May 9, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants