Skip to content

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