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

feat: add generation of type description to schema (#708) #1106

Merged
merged 9 commits into from Jan 20, 2022

Conversation

KuboOrk
Copy link
Contributor

@KuboOrk KuboOrk commented Jan 19, 2022

Describe the PR
Added "description" field generation for swagger scheme from struct documentation

Relation issue
#708

Additional context
None

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #1106 (b2050eb) into master (8ffc6c2) will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1106      +/-   ##
==========================================
+ Coverage   94.47%   94.59%   +0.12%     
==========================================
  Files           9        9              
  Lines        2316     2370      +54     
==========================================
+ Hits         2188     2242      +54     
  Misses         67       67              
  Partials       61       61              
Impacted Files Coverage Δ
parser.go 92.55% <100.00%> (+0.27%) ⬆️
gen/gen.go 93.03% <0.00%> (+0.98%) ⬆️

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 8ffc6c2...b2050eb. Read the comment docs.

@ubogdan
Copy link
Contributor

ubogdan commented Jan 19, 2022

@KuboOrk, would you mind adding a test case so code coverage will get back to positive?

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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

Great job till now. Please see my comments regarding code styling.

parser.go Show resolved Hide resolved
README.md Show resolved Hide resolved
parser.go Outdated Show resolved Hide resolved
parser.go Show resolved Hide resolved
- moved "if" statement out of the method
- renamed fillDefinition → fillDefinitionDescription
- increase code readability by union conditions
- moved result variable declaration inside function body
@KuboOrk KuboOrk requested a review from ubogdan January 20, 2022 15:17
Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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

LGTM

@ubogdan ubogdan merged commit 32f02b9 into swaggo:master Jan 20, 2022
@ubogdan
Copy link
Contributor

ubogdan commented Jan 20, 2022

@KuboOrk Thanks for your contribution!

@KuboOrk KuboOrk deleted the add-struct-doc-to-definition branch January 21, 2022 06:31
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.

None yet

2 participants