Skip to content

Path variable resolved as empty string #1728

Open
@ecattez

Description

@ecattez

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"
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions