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
[Validation] Get the schema of matching content type for request body validation #1494
Comments
@raymondfeng I think this should be already fixed/implemented by your recently landed pull request #1838. Could you please confirm? If it's true, then I think we should still keep this issue open but reduce the scope to writing an integration or acceptance tests verifying this aspect of our body parsing. I.e. define an operation that has different schemas for JSON and urlencoded bodies and verify that the correct schema was used to validate the incoming request. Thoughts? |
I believe so, but better get a confirm from Raymond. IMO this issue is ok to close. |
Yes, I think so. |
I updated the acceptance criteria, there are still two tasks remaining:
Let's keep this GH issue open until all acceptance criteria are met. |
To be completed by #2079 |
Completed by #2079 |
Description / Steps to reproduce / Feature proposal
A request body specification could contain different content-types, each has a schema defined. By validating the request body when a request comes in, the validator should get the schema that matches the request's content type to perform the validation.
see comment in code
Current Behavior
We use the schema of the first content-type by default
Expected Behavior
The content-type should be inferred from the request
Acceptance Cretiria
validateRequestBody
- see feat(rest): add support for form request body #1838getRequestBodySchema
- see feat(rest): add support for form request body #1838aBodySpec
to allow multiple contentsThe text was updated successfully, but these errors were encountered: