swagger-core
swagger-core copied to clipboard
JAX-RS ignores required attribute for body parameters
When using the @ApiParam annotation for a body parameter, the required attribute is being ignored. It seems that the ParameterProcessor class is not calling the BodyParameter.setRequired() method, however it does set the value correctly for non-body parameters.
You can find an example of this in the java-jaxrs project. The UserResource class has a method called updateUser() which has a path parameter and also a body parameter. Both are set to required, however the generated document only specifies the path parameter as required.
I tested this in version 1.5.1-M2.
Working on.
Fixed in develop_2.0.