Class ValidationMediaTypes
java.lang.Object
ch.nexsol.gateway.validation.ValidationMediaTypes
Which media types this plugin can hold against a schema.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisJson(org.springframework.http.MediaType contentType) Returns whether a body of this media type can be validated against a JSON schema.
-
Method Details
-
isJson
public static boolean isJson(org.springframework.http.MediaType contentType) Returns whether a body of this media type can be validated against a JSON schema. Everything else — a multipart upload, a binary stream, an image, a form submission — carries nothing a JSON schema could be applied to, which is what lets the filter decide not to buffer it at all.- Parameters:
contentType- the media type of the body, may benull- Returns:
trueforapplication/jsonand any+jsonsuffixed type
-