spring-projects / spring-projects/spring-hateoas
Path variable resolved as empty string
Open
@odrotbohm is already working on this.
Since Dec 1, 2023.
process: waiting for feedback
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Since version 1.4, path variables are resolved as empty strings instead of template variables in target field:
The link creation:
linkTo(methodOn(SelectColorResource.class)
.selectColor(null, null))
.withRel("select-color");
The SelectColorController
@PostMapping("/select-color)
public RepresentationModel selectColor(
@PathVariable ProductId productId,
@Valid @RequestBody SelectColorRequest request) {
...
}
Before 1.4:
{
"method":"POST",
"properties":[{"name":"reference","required":true,"type":"text"}],
"target":"http://localhost/products/{productId}/select-color"
}
Since 1.4:
{
"method":"POST",
"properties":[{"name":"reference","required":true,"type":"text"}],
"target":"http://localhost/products//select-color"
}
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.
Assessment
This issue has not been assessed yet.