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:
Mauro de Wit
2022-04-01 05:01:46 +02:00
committed by GitHub
parent 8f4106f3e1
commit dc43042259

View File

@@ -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;