-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Reflect well-known MediaTypes intent in Javadoc #33754
Comments
This is really perfect timing! Working on Spring AI, we hit the limits of the |
We will discuss that within the team and provide a feedback. |
Our general policy leans towards accepting new static values there only for media types that are used by the Spring Framework or a module integration. If anything, I'm not sure the I think a fair comparison would be Spring HATEOAS, which needs and supports specific media types. They're declared in a dedicated class and co-located with the code that supports them. We've had numerous requests asking to add new entries there, I think this comes from a perspective where adding a media type there makes it somewhat official in the Spring ecosystem, whereas we expect I think we should revisit the values currently listed in |
We discussed this as a team today and decided the following:
I'm turning this issue into a documentation issue; we should update the |
It is 2024 and I think the
MediaType
class should add several of the more common image-related mime-types such as:image/webp
image/avif
image/svg+xml
I know there are a ton of mime-types out there, but Spring Framework should add a few of the ones that have become quite common recently. Seeing only GIF, JPEG and PNG in the list feels rather old-school. This would be quite convenient, also, when building a
ResponseEntity
.For reference: there was an old issue from 2018 that was closed: #18446
The text was updated successfully, but these errors were encountered: