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

Support accept Header & Use RequestBody #1541

Merged
merged 3 commits into from
Apr 7, 2023
Merged

Conversation

Nerzal
Copy link
Contributor

@Nerzal Nerzal commented Apr 6, 2023

Describe the PR
The current V2 branch parses RequestBody parameters into the parameter object and always defaults to application/json in requestBodies.

With this pullRequest we are aware of accept headers and use the correct mimeType in the RequestBody for the most common mimeTypes.

Relation issue
Implement #1540

Additional context
In the future we should deprecate the use of the param comment for the body and create a new // @requestBody comment type to support all available fields

@Nerzal Nerzal added enhancement v2 Used for all v2 related issues labels Apr 6, 2023
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Patch coverage: 87.75% and project coverage change: -0.15 ⚠️

Comparison is base (677b4c2) 77.80% compared to head (4e397c9) 77.66%.

❗ Current head 4e397c9 differs from pull request most recent head 69f4e5c. Consider uploading reports for the commit 69f4e5c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #1541      +/-   ##
==========================================
- Coverage   77.80%   77.66%   -0.15%     
==========================================
  Files          21       21              
  Lines        5415     5488      +73     
==========================================
+ Hits         4213     4262      +49     
- Misses       1026     1044      +18     
- Partials      176      182       +6     
Impacted Files Coverage Δ
operationv3.go 83.59% <87.75%> (-2.13%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ubogdan ubogdan merged commit 6e63ab7 into swaggo:v2 Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v2 Used for all v2 related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants