Class ValidatorMediaTypeUtil
java.lang.Object
io.quarkus.hibernate.validator.runtime.jaxrs.ValidatorMediaTypeUtil
Utility class to deal with MediaTypes in JAX-RS endpoints.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final List<jakarta.ws.rs.core.MediaType> -
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.ws.rs.core.MediaTypegetAcceptMediaType(List<jakarta.ws.rs.core.MediaType> mediaTypesFromRequest, List<jakarta.ws.rs.core.MediaType> mediaTypesFromProducesAnnotation) Look up the right media type taking into account the HTTP request and the media types defined in the `@Produces` annotation.
-
Field Details
-
SUPPORTED_MEDIA_TYPES
-
-
Method Details
-
getAcceptMediaType
public static jakarta.ws.rs.core.MediaType getAcceptMediaType(List<jakarta.ws.rs.core.MediaType> mediaTypesFromRequest, List<jakarta.ws.rs.core.MediaType> mediaTypesFromProducesAnnotation) Look up the right media type taking into account the HTTP request and the media types defined in the `@Produces` annotation.- Parameters:
mediaTypesFromRequest- list of media types in the HTTP request.mediaTypesFromProducesAnnotation- list of media types set in the `@Produces` annotation.- Returns:
- one supported media type from either the HTTP request or the annotation.
-