wI2L / fizz

:lemon: Gin wrapper with OpenAPI 3 spec generation
https://pkg.go.dev/github.com/wI2L/fizz
MIT License
214 stars 52 forks source link

Use tag to determine if to flatten or not an embedded anonymous field #85

Closed vladshub closed 2 years ago

vladshub commented 2 years ago

If we would take for example a kube object Pod it has ObjectMeta as an embedded field but if we render it via json.Marshal we would get a nice metadata field in our json. However in our OpenAPI definition this field would be missing.

vladshub commented 2 years ago

@wI2L thanks for the review, fixed the issues.

codecov[bot] commented 2 years ago

Codecov Report

Merging #85 (410edcd) into master (9301be1) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   94.34%   94.35%   +0.01%     
==========================================
  Files           7        7              
  Lines         973      975       +2     
==========================================
+ Hits          918      920       +2     
  Misses         39       39              
  Partials       16       16              
Impacted Files Coverage Δ
openapi/generator.go 93.91% <100.00%> (+0.01%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

vladshub commented 2 years ago

Thank you 👍