Skip to content

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.*[[email protected] == '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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants