Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Return hateoas resource from all endpoints that currently do not support them. #37

Open
lealceldeiro opened this issue Apr 11, 2020 · 0 comments
Assignees
Labels
enhancement server Issues related to the backend.

Comments

@lealceldeiro
Copy link
Owner

Is your feature request related to a problem? Please describe.
By default, all resources automatically managed by Spring when org.springframework.boot:spring-boot-starter-hateoas is present in the application are returned (on creation, for example) has hateoas resources. Some custom endpoints which are not handled by Spring repositories, but are custom endpoints, do no follow this approach.

All endpoints should be standardized to return the resources the same way, for example on Brole creation as a response body we get something like:

{
  "label": "Role label",
  "description": "Some descriptionr",
  "enabled": true,
  "id": 37,
  "_links": {
    "self": {
      "href": "<url>"
    },
    "bRole": {
      "href": "<url>/role/37"
    },
    "permissions": {
      "href": "url/role/37/permissions"
    }
  }
}

But, for other endpoints such as the one for user creation (custom ones) the response body is empty.

Describe the solution you'd like
Return the newly created|deleted|updated resource information as it is returned by the default spring hateoas project.

@lealceldeiro lealceldeiro added enhancement server Issues related to the backend. labels Apr 11, 2020
@lealceldeiro lealceldeiro self-assigned this Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement server Issues related to the backend.
Projects
None yet
Development

No branches or pull requests

1 participant