Description
Suppose you have
@POST
@Path("/example")
public void addBar(MyBean myBean) {
System.out.println(myBean.bar);
}
Then OpenAPI should list a 400 code in the responses section (unless the user explicitly provides one), as RestEasy will reject the request when the passed data can't be de-serialized into myBean.
If a @Valid annotation is present, the same applies, but it means that the constraints inside the bean are checked as well. E.g.
public class MyBean {
@NotNull @Length(max = 6, min = 2)
String bar;
Here the component.schema should list the min/max length and also the 400 error should be listed if not done before
Related to #27375
Implementation ideas
No response
Description
Suppose you have
Then OpenAPI should list a 400 code in the responses section (unless the user explicitly provides one), as RestEasy will reject the request when the passed data can't be de-serialized into
myBean.If a
@Validannotation is present, the same applies, but it means that the constraints inside the bean are checked as well. E.g.Here the component.schema should list the min/max length and also the 400 error should be listed if not done before
Related to #27375
Implementation ideas
No response