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 OpenAPI security #50

Closed hmajid2301 closed 3 years ago

hmajid2301 commented 3 years ago

Added OpenAPI security related struct data to the spec.go.

Fixes #35

codecov[bot] commented 3 years ago

Codecov Report

Merging #50 (4cdbb8f) into master (7bb66a1) will decrease coverage by 0.21%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #50      +/-   ##
==========================================
- Coverage   96.17%   95.95%   -0.22%     
==========================================
  Files           7        7              
  Lines         889      891       +2     
==========================================
  Hits          855      855              
- Misses         20       22       +2     
  Partials       14       14              
Impacted Files Coverage Δ
fizz.go 97.20% <0.00%> (-1.38%) :arrow_down:
openapi/spec.go 100.00% <ø> (ø)

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 7bb66a1...4cdbb8f. Read the comment docs.

wI2L commented 3 years ago

Sure.

Le jeu. 10 déc. 2020 à 23:41, Haseeb Majid notifications@github.com a écrit :

@hmajid2301 commented on this pull request.

In openapi/spec.go https://github.com/wI2L/fizz/pull/50#discussion_r540550654:

@@ -305,3 +308,24 @@ type Tag struct { Name string json:"name" yaml:"name" Description string json:"description,omitempty" yaml:"description,omitempty" } + +type SecuritySchemes struct {

  • Type string json:"type,omitempty" yaml:"type,omitempty"
  • Scheme string json:"scheme,omitempty" yaml:"scheme,omitempty"
  • Description string json:"description,omitempty" yaml:"description,omitempty"
  • In string json:"in,omitempty" yaml:"in,omitempty"
  • Name string json:"name,omitempty" yaml:"name,omitempty"
  • OpenIdConnectUrl string json:"openIdConnectUrl,omitempty" yaml:"openIdConnectUrl,omitempty"
  • Flows map[string]*OAuthFlows json:"flows,omitempty" yaml:"flows,omitempty" +}
  • +type OAuthFlows struct {

yeh sorry i should've been more clear with my wording. Ok I'll add to the PR as well ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wI2L/fizz/pull/50#discussion_r540550654, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRXWEK6CH73JMUWMMLJBD3SUFE75ANCNFSM4UHKGF7A .

wI2L commented 3 years ago

@hmajid2301 I'll be off (holidays) next week, I'll take time to review the changes.

nejcpotrebujes commented 3 years ago

@wI2L Is there anything I can help in this PR. I would love to have this functionality.

wI2L commented 3 years ago

@nejcpotrebujes The PR should be almost complete, I need to take time to review it at last.

hmajid2301 commented 3 years ago

Hey @wI2L any update on this ?

nikicc commented 3 years ago

Just checking what's the status of this? Would also find this super helpful 🙏

wI2L commented 3 years ago

Continued in #59. Closing in favor of this new PR.