Skip to content

Ensure plugin helpers get component copies#704

Merged
lafrech merged 1 commit intodevfrom
plugin_helpers_get_copies
Aug 10, 2021
Merged

Ensure plugin helpers get component copies#704
lafrech merged 1 commit intodevfrom
plugin_helpers_get_copies

Conversation

@lafrech
Copy link
Copy Markdown
Member

@lafrech lafrech commented Aug 10, 2021

This PR passes the copied structure rather than the original to the helpers. This avoids issues if the plugin helper mutates the component.

It also uses deepcopies, to be safer. It might be a bit overkill but the cost is low anyway. This could bring issues if someone passed non-deepcopiable stuff to a custom plugin, but this issue is not really new as we already deepcopy in APISpec.path.

@lafrech lafrech merged commit 45b2dfc into dev Aug 10, 2021
@lafrech lafrech deleted the plugin_helpers_get_copies branch August 10, 2021 19:27
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.

1 participant