Skip to content

feat(form): add array collection format in form binding#3986

Merged
appleboy merged 3 commits into
gin-gonic:masterfrom
slowhigh:master
Aug 24, 2024
Merged

feat(form): add array collection format in form binding#3986
appleboy merged 3 commits into
gin-gonic:masterfrom
slowhigh:master

Conversation

@slowhigh

@slowhigh slowhigh commented Jun 7, 2024

Copy link
Copy Markdown
Contributor

Enables the possibility of collecting array data from queries or form data by specifying the collection_format tag in structs.

Several people are waiting for this feature to be updated.

cc @Simon-Saaw

Related PR: #2750
Close #2750

@slowhigh slowhigh marked this pull request as draft July 3, 2024 23:45
@slowhigh slowhigh marked this pull request as ready for review July 3, 2024 23:45
@slowhigh slowhigh marked this pull request as draft August 11, 2024 07:41
@slowhigh slowhigh marked this pull request as ready for review August 11, 2024 07:41
@takanuva15

Copy link
Copy Markdown
Contributor

Just saw the old PR you linked and was excited to see that someone else took up the old dead PR to make this a feature in gin. Looking forward to getting this merged!

@slowhigh

Copy link
Copy Markdown
Contributor Author

Thank you for your comments. @takanuva15

Comment thread binding/form_mapping.go Outdated
@appleboy

Copy link
Copy Markdown
Member

@slowhigh Any updates?

@appleboy appleboy added this to the v1.11 milestone Aug 15, 2024
@slowhigh

Copy link
Copy Markdown
Contributor Author

@appleboy Thank you. Good idea.

@slowhigh slowhigh requested a review from appleboy August 15, 2024 06:17
@appleboy

Copy link
Copy Markdown
Member

@slowhigh

Copy link
Copy Markdown
Contributor Author

@appleboy I have addressed the lint error you mentioned.

@appleboy

Copy link
Copy Markdown
Member

@slowhigh LGTM

@codecov

codecov Bot commented Aug 24, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.

Project coverage is 98.85%. Comparing base (3dc1cd6) to head (70108c0).
Report is 68 commits behind head on master.

Files Patch % Lines
binding/form_mapping.go 77.77% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3986      +/-   ##
==========================================
- Coverage   99.21%   98.85%   -0.36%     
==========================================
  Files          42       44       +2     
  Lines        3182     2799     -383     
==========================================
- Hits         3157     2767     -390     
- Misses         17       19       +2     
- Partials        8       13       +5     
Flag Coverage Δ
?
-tags "sonic avx" 98.84% <77.77%> (?)
-tags go_json 98.84% <77.77%> (?)
-tags nomsgpack 98.83% <77.77%> (?)
go-1.18 ?
go-1.19 ?
go-1.20 ?
go-1.21 98.85% <77.77%> (-0.36%) ⬇️
go-1.22 98.85% <77.77%> (?)
macos-latest 98.85% <77.77%> (-0.36%) ⬇️
ubuntu-latest 98.85% <77.77%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@appleboy appleboy merged commit 3cb3067 into gin-gonic:master Aug 24, 2024
1911860538 pushed a commit to 1911860538/gin that referenced this pull request Feb 26, 2025
* feat(form): add array collection format in form binding

* feat(form): add array collection format in form binding

* test(form): fix test code for array collection format in form binding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants