Class ValidatorMediaTypeUtil
- java.lang.Object
-
- io.quarkus.hibernate.validator.runtime.jaxrs.ValidatorMediaTypeUtil
-
public final class ValidatorMediaTypeUtil extends Object
Utility class to deal with MediaTypes in JAX-RS endpoints.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static List<jakarta.ws.rs.core.MediaType>SUPPORTED_MEDIA_TYPES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
SUPPORTED_MEDIA_TYPES
static final List<jakarta.ws.rs.core.MediaType> SUPPORTED_MEDIA_TYPES
-
-
Method Detail
-
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.
-
-