Skip to content

Fix binding for JSON body #1299

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

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Conversation

ShouheiNishi
Copy link
Contributor

@ShouheiNishi ShouheiNishi commented Oct 4, 2023

This PR use ShouldBindJSON instead of ShouldBind for binding of JSON body to resolve issue #1298.

@ShouheiNishi ShouheiNishi changed the title Fix binding for JSON bod Fix binding for JSON body Oct 4, 2023
@ShouheiNishi ShouheiNishi marked this pull request as ready for review October 4, 2023 03:49
@jamietanna jamietanna added the bug Something isn't working label Dec 13, 2023
@jamietanna jamietanna merged commit 839a661 into oapi-codegen:master Dec 13, 2023
@jamietanna
Copy link
Member

Thank you!

danicc097 pushed a commit to danicc097/oapi-codegen that referenced this pull request Aug 31, 2024
When using the strict server, binding a request body that is JSON
compatible - but not `application/json` - will result in errors.

We can therefore correctly bind the body using `ShouldBindJSON`.

Closes oapi-codegen#1298.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants