-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SPI for media types needs to reflect it's ONLY for internal usage. #1304
Comments
If a project-provided mediatype should only be activated when explicitly requested via @EnableHypermediaSupport. However, a custom mediatype should never be filted out because of this. To handle this, a marker interface is defined that all the project-specific mediatypes can implement. This was, the enabling code can test whether or not the project-specific mediatypes "support" the declared mediatypes. However, mediatypes that do NOT have this marker interface (custom ones), should be registered unconditionally.
I don't actually think, we need a fix for that but in the documentation. The @toedter – Would you mind trying whether this solves your problem? |
|
… types. Custom media types do NOT require registering a MediaTypeConfigurationProvider implementation with spring.factories. The reference docs must be updated to illustrate this. Also add to the javadocs so users are properly warned.
… types. Custom media types do NOT require registering a MediaTypeConfigurationProvider implementation with spring.factories. The reference docs must be updated to illustrate this. Also add to the javadocs so users are properly warned.
Custom media types do NOT require registering a MediaTypeConfigurationProvider implementation with spring.factories. The reference docs must be updated to illustrate this. Also add to the javadocs so users are properly warned. Original issue: #1304
Resolved via 4720e56. |
I am currently trying.... |
On gitter, @toedter reported having an issue registering his custom mediatype for JSON:API.
Turns out, the problem was that when loading a provider from
spring.factories
, Spring HATEOAS filters against the list of media types registered via@EnableHypermediaSupport
. Further digging shows that we don't actually have any tests exercising a custom media type loaded fromspring.factories
.The text was updated successfully, but these errors were encountered: