You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using "Embedded Values" in spring, WebMvcLinkBuilder does not correctly resolve the value. This does not seem to be an esoteric way of writing a RestController, as among other things this is how the OpenAPI generator generates server stubs.
Example:
@RestController
@RequestMapping("${openapi.example.base-path:/example}")
public class HelloController {
}
Failing Test:
@Test
void LinkBuilderAndSpringEmbeddedValueResolver() {
var result = WebMvcLinkBuilder.linkTo(HelloController.class)
.withRel("example");
assertThat(result).extracting(Link::getHref).isEqualTo("http://localhost/example");
}
Result:
expected: "http://localhost/example"
but was: "http://localhost/example}"
The text was updated successfully, but these errors were encountered:
When using "Embedded Values" in spring, WebMvcLinkBuilder does not correctly resolve the value. This does not seem to be an esoteric way of writing a RestController, as among other things this is how the OpenAPI generator generates server stubs.
Example:
Failing Test:
Result:
The text was updated successfully, but these errors were encountered: