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

Fix nested struct parsing #514

Merged
merged 3 commits into from
Sep 11, 2019
Merged

Fix nested struct parsing #514

merged 3 commits into from
Sep 11, 2019

Conversation

importcjj
Copy link
Contributor

Describe the PR
When I use swag, I found two problems;

  1. Nested structs inside can not be parsed correctly.

  2. When the response struct and the API function exist in the same file, the struct can not be parsed.

Relation issue
#504

Additional context
Add any other context about the problem here.

@codecov-io
Copy link

codecov-io commented Sep 11, 2019

Codecov Report

Merging #514 into master will decrease coverage by 0.27%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #514      +/-   ##
==========================================
- Coverage   87.05%   86.78%   -0.28%     
==========================================
  Files           7        7              
  Lines        1522     1536      +14     
==========================================
+ Hits         1325     1333       +8     
- Misses        115      119       +4     
- Partials       82       84       +2
Impacted Files Coverage Δ
operation.go 92.6% <100%> (+0.05%) ⬆️
parser.go 82.1% <61.53%> (-0.48%) ⬇️

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 4f860d7...d83d179. Read the comment docs.

@ubogdan
Copy link
Contributor

ubogdan commented Sep 11, 2019

Can you please add test case for this scenario ?
Thanks for your contribution !

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 d74ed70 into swaggo:master Sep 11, 2019
@ubogdan
Copy link
Contributor

ubogdan commented Sep 11, 2019

Great job ! Thanks for your contribution !

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.

3 participants