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: Generic Fields does not handle Arrays in the .swaggo file #1322

Merged
merged 2 commits into from Sep 15, 2022

Conversation

FabianMartin
Copy link
Contributor

Describe the PR
Fixes Bug described in #1318 and #1320

Relation issue

Additional context
Since I did not find any suitable tests, I integrated them into the generics tests.
Tested with Go 1.15, 1.16, 1.17, 1.18 and 1.19.

- Detect array type and transform schema into spec.ArrayProperty if needed

fixes swaggo#1318, swaggo#1320
@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #1322 (c9e9d4e) into master (bc895ed) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1322   +/-   ##
=======================================
  Coverage   95.63%   95.63%           
=======================================
  Files          14       14           
  Lines        2863     2865    +2     
=======================================
+ Hits         2738     2740    +2     
  Misses         70       70           
  Partials       55       55           
Impacted Files Coverage Δ
operation.go 96.24% <100.00%> (+0.01%) ⬆️
parser.go 93.88% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

- use methods from Operation to get schema
- methods parseObjectSchema and parseCombinedObjectSchema disconnected from struct
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 b8f53da into swaggo:master Sep 15, 2022
@ubogdan
Copy link
Contributor

ubogdan commented Sep 15, 2022

@FabianMartin Thanks for your contribution.

@FabianMartin FabianMartin deleted the override-array branch September 15, 2022 19:37
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