forked from loafle/openapi-generator-original
Conditionally import the java validation API (#11999)
In case 'useBeanValidation' is enabled the relevant annotation classes should be imported on the API as well. In the current version (5.4.0) the resource methods parameters are annotated with @Valid but without importing them.
This commit is contained in:
@@ -16,6 +16,11 @@ import javax.ws.rs.core.MediaType;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
{{/disableMultipart}}
|
||||
|
||||
{{#useBeanValidation}}
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
{{/useBeanValidation}}
|
||||
|
||||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
|
||||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user