-
Feature
-
Resolution: Done
-
Major
-
None
-
False
-
-
False
-
---
Given a media type with suffix, for example: "application/test+json".
Before these changes, Resteasy Reactive was trying to find the writer/reader using only the suffix. For example, with a media type "application/test+json", it would only use "json" to locate the right writer/reader.
Spite of this has been working well so far, if users provide a custom writer/reader for a concrete media type with suffix:
```java
@Provider
@Produces("text/test+suffix")
public static class SuffixMessageBodyWriter implements ServerMessageBodyWriter<Object> {
@Override
public boolean isWriteable(Class<?> type, Type genericType, ResteasyReactiveResourceInfo target, MediaType mediaType)
@Override
public void writeResponse(Object o, Type genericType, ServerRequestContext context)
// ...
}
```
The above writer will never be used.
After these changes, we will use the media type with suffix, plus the split parts of the suffix. For example, if the media type with suffix is: "application/test+json", it will try to find the best writer/reader for "application/test+json", "application/test" and then "application/json" (In this order).