truss icon indicating copy to clipboard operation
truss copied to clipboard

fix: correctly map request body field by name

Open chebykinn opened this issue 4 years ago • 0 comments

Hi, I've tried to fix issue #325, this PR should do it.

I've changed the field path to body_root if the current field is mapped by name, which allows setting RequestRootField in gengokit/http_transport.go, which is, in turn, checked in the template to select in which variable body will be deserialized. This fixes the issue in my cases, although maybe it should probably be worth hiding this fix under some option, at least for a few releases to keep backward compatibility.

chebykinn avatar Feb 27 '21 17:02 chebykinn