Skip to content

Fix request editors not updating the original request#306

Merged
deepmap-marcinr merged 2 commits intooapi-codegen:masterfrom
j--wong:master
Mar 18, 2021
Merged

Fix request editors not updating the original request#306
deepmap-marcinr merged 2 commits intooapi-codegen:masterfrom
j--wong:master

Conversation

@j--wong
Copy link
Copy Markdown
Contributor

@j--wong j--wong commented Feb 26, 2021

  • This PR fixes the issue we came across with the latest version of the tool where request editor modifications to the request object are not preserved
  • This seems to be caused by the shallow copy of the request object in the applyEditors function
  • This PR moves the shallow copy back to where it was before the multiple request editors feature was introduced
  • Tested this in our internal projects and working as expected
  • I got a request editor fix tag if anyone wants to test their scenarios; add below to your go.mod to replace the dependency with my fix
replace github.com/deepmap/oapi-codegen v1.5.1 => github.com/j--wong/oapi-codegen v1.5.2-refix.0

@deepmap-marcinr deepmap-marcinr merged commit 6792ce9 into oapi-codegen:master Mar 18, 2021
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
…gen#306)

Co-authored-by: Marcin Romaszewicz <47459980+deepmap-marcinr@users.noreply.github.com>
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