Skip to content
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

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Conversation

DenisPalnitsky
Copy link
Contributor

I got confused why there is no OpenAPI static method and then realized that it's a struct method

@@ -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"))
Copy link
Owner

@wI2L wI2L Jan 18, 2022

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Added.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

wI2L
wI2L previously approved these changes Jan 19, 2022
@wI2L
Copy link
Owner

wI2L commented Jan 19, 2022

@DenisPalnitsky LGTM. Could you please rebase?

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #68 (8a1c617) into master (a1906d8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

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

@DenisPalnitsky
Copy link
Contributor Author

@DenisPalnitsky LGTM. Could you please rebase?

Done

@wI2L wI2L changed the title Documentation. Should be a call to instance of fizz, not a static func docs: clarify scope of OpenAPI method Jan 21, 2022
@wI2L wI2L merged commit ad0868d into wI2L:master Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants