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

fix: omission of x-internal operation field #71

Closed nikicc closed 2 years ago

nikicc commented 2 years ago

This PR fixes the issue found in the latest v0.18.0 release.

x-internal is never exposed any more. I think the issue is in the omitOperationNilFields where we did not copy the value of x-internal over.

codecov[bot] commented 2 years ago

Codecov Report

Merging #71 (973cd37) into master (52f6cc3) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #71   +/-   ##
=======================================
  Coverage   95.18%   95.19%           
=======================================
  Files           7        7           
  Lines         956      957    +1     
=======================================
+ Hits          910      911    +1     
  Misses         30       30           
  Partials       16       16           
Impacted Files Coverage Δ
openapi/spec.go 82.05% <100.00%> (+0.47%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 52f6cc3...973cd37. Read the comment docs.

nikicc commented 2 years ago

@wI2L wdyt?

wI2L commented 2 years ago

@nikicc Looks like it. Does the operation for which is missing has a nil Security field ? (merged the other fix, please rebase this one, thanks)

nikicc commented 2 years ago

@nikicc Looks like it. Does the operation for which is missing has a nil Security field ?

Yes, the Security is nil in my case. But that is a valid use-case, right?

(merged the other fix, please rebase this one, thanks)

Done.