swaggest / rest

Web services with OpenAPI and JSON Schema done quick in Go
https://pkg.go.dev/github.com/swaggest/rest
MIT License
362 stars 17 forks source link

Tolerate form-data for request bodies with json tags #91

Closed cussrox closed 1 year ago

cussrox commented 1 year ago

This PR fixes behavior of handling structures that have both formData and json field tags.

codecov[bot] commented 1 year ago

Codecov Report

Merging #91 (d2edb9a) into master (7f12e41) will increase coverage by 0.05%. The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   77.52%   77.57%   +0.05%     
==========================================
  Files          27       27              
  Lines        1428     1436       +8     
==========================================
+ Hits         1107     1114       +7     
- Misses        206      207       +1     
  Partials      115      115              
Flag Coverage Δ
unittests 77.57% <85.71%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
request/factory.go 86.72% <66.66%> (+0.11%) :arrow_up:
request/jsonbody.go 97.29% <90.90%> (-2.71%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more