Closed clone1612 closed 3 months ago
We have some fallback code defaulting to InEnum.QUERY
Maybe one or both of these should be changed to InEnum.BODY?
For reference, could you give an example of what a missing request body issue looks like when thrown by APIGW?
APIGW returns the following:
{
"type": "urn:problem-type:belgif:badRequest",
"href": "https://www.belgif.be/specification/rest/api-guide/problems/badRequest.html",
"title": "Bad Request",
"status": 400,
"detail": "The input message is incorrect",
"issues": [
{
"type": "urn:problem-type:belgif:input-validation:schemaViolation",
"title": "Input value is invalid with respect to the schema",
"in": "body",
"detail": "is required",
}
]
}
Its detail message can/should also be improved.
Interfaces for endpoints with a request body are generated like this:
When sending a request without one request validation results in the following Problem type:
That response "issues" block has 3 values that seem incorrect:
But can we easily determine that the constraint validation exception parameter, e.g. here "authenticationRequest" was actually a body? Spring has the
@RequestBody
annotation but we don't have an equivalent for jax-rs.