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 to support post a json request with non-object content #20

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

xinz
Copy link
Contributor

@xinz xinz commented Feb 7, 2023

Related #19

By default there uses Plug.Parsers.JSON to parse JSON request body, but it will wrap a "_json" key into the request body parameter if the parsed parameter is not a map, this PR to properly unwrap this automatic appended "_json" key, and keep the request body parameter parsed and validated follow the schema of the defined OpenAPI specification.

@xinz xinz merged commit ea76ff0 into main Feb 7, 2023
@xinz xinz deleted the adapt_json_key branch February 7, 2023 09:10
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.

1 participant