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

Add package and struct name to OperationInfo #62

Closed armandpicard closed 2 years ago

armandpicard commented 3 years ago

Signed-off-by: Armand Picard a.picard@instadeep.com

wI2L commented 3 years ago

Fixes #61

wI2L commented 3 years ago

I'll be willing to merge that if it doesn't change the current behaviour. So it must be an opt-in option on the generator.

armandpicard commented 3 years ago

I've put a function in the generator that is use to generate the name from the handler. It's set to (*tonic.Route).HandlerName and can be change by the user.

wI2L commented 2 years ago

@armandpicard Still willing to merge, apologies for the delay. Could you add some tests and a mention of the function method in the README please. Also, needs a rebase from master.

codecov[bot] commented 2 years ago

Codecov Report

Merging #62 (51e722f) into master (d0b235e) will decrease coverage by 0.89%. The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   95.88%   94.99%   -0.90%     
==========================================
  Files           7        7              
  Lines         924      959      +35     
==========================================
+ Hits          886      911      +25     
- Misses         22       32      +10     
  Partials       16       16              
Impacted Files Coverage Δ
openapi/generator.go 93.98% <33.33%> (-0.42%) :arrow_down:
fizz.go 98.68% <100.00%> (+0.08%) :arrow_up:
openapi/spec.go 81.57% <0.00%> (-18.43%) :arrow_down:

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 d0b235e...51e722f. Read the comment docs.