-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: clarify scope of OpenAPI method #68
Conversation
@@ -271,7 +271,7 @@ infos := &openapi.Info{ | |||
Description: `This is a sample Fruits market server.`, | |||
Version: "1.0.0", | |||
} | |||
f.GET("/openapi.json", nil, fizz.OpenAPI(infos, "json")) | |||
f.GET("/openapi.json", nil, f.OpenAPI(infos, "json")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f
is often used in the examples to represent a fizz.Fizz
instance. For clarity, I think we should add a declaration in this example such as f := fizz.New()
using fizz.New
to be explicit that the function is a method of a fizz.Fizz
instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@DenisPalnitsky LGTM. Could you please rebase? |
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
=======================================
Coverage 95.19% 95.19%
=======================================
Files 7 7
Lines 957 957
=======================================
Hits 911 911
Misses 30 30
Partials 16 16 Continue to review full report at Codecov.
|
8dc7c62
to
8a1c617
Compare
Done |
I got confused why there is no OpenAPI static method and then realized that it's a struct method