spring-projects / spring-projects/spring-hateoas
OptionalParameters returned with curly braces in the link response
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
public TemplateVariables concat(Collection variables) {
...
}
Returns "{?view}" and as a result the link created contains {?view} appended in the end (with the extra curly braces).
I suspect that the value returned should not have curly braces.
Here "view" is an optional parameter in the restful controller
...
@RequestParam(value = "view", required = false) String viewString
..
Below mentioned is the snippet of the response with contains the optional parameters
.....
"_links": {
"self": {
"href": "http://localhost:8080/v1/school/00000000-0000-0000-0000-000000000000{?view}",
"templated": true
},
"members": {
"href": "http://localhost:8080/v1/school/00000000-0000-0000-0000-000000000000/members{?view}",
"templated": true
}
}
....
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with TemplateVariables.concat(Collection) and reproduce the generated _links response using the controller's optional view parameter. Compare the resulting href with the expected optional-parameter format; done means the link response no longer contains unintended curly braces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100