Skip to content

Commit

Permalink
Add comment to DelegatingProfileController stating why a custom resou…
Browse files Browse the repository at this point in the history
…rce is created
  • Loading branch information
vierbergenlars committed Aug 3, 2023
1 parent e49131a commit 4fd38af
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public HttpEntity<ProfileLinksResource> listAllFormsOfMetadata() {
var resource = new ProfileLinksResource();
var originalModel = delegate.listAllFormsOfMetadata();

// The change from the spring-data-rest ProfileController is returning a specific ProfileLinksResource.
// This specific resource class can be used by a RepresentationModelProcessor to further enhance the response.
resource.add(originalModel.getBody().getLinks().toList());

return ResponseEntity.ok()
Expand Down

0 comments on commit 4fd38af

Please sign in to comment.