Skip to content

Provide a mechanism to serve hypermedia responses to requests that accept application/json #1074

@wilkinsona

Description

@wilkinsona

In Spring Boot 1.2 (I think) we added support for serving HAL in response to requests that accept application/json. This was originally mentioned in this comment but I think it ought to be tracked as a separate issue.

The way that we achieve the behaviour described above has changed a bit over time. The current implementation relies on the mutability of TypeConstrainedMappingJackson2HttpMessageConverter to add application/json to its supported media types. We need to be able to do something similar for HATEOAS on top of WebFlux and I don't think it's possible without resorting to reflection at the moment.

Taking a step back, perhaps it would be better to revisit the approach that we took for MVC at the same time and for Spring HATEOAS to provide a first-class configuration setting for this?

This is a similar issue to #1073 but is about allowing requests for application/json to receive a HAL (or other format) response.

Metadata

Metadata

Assignees

Labels

in: mediatypesMedia type related functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions