Mandatory parameter/header is missing: name #5202
-
I have two following methods:
Armeria:
When I make a request When I make a request How do I solve this problem? Log: Stacktrace: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! We probably need to add a I've confirmed the following works in my local env. @RegisterExtension
static final ServerExtension server = new ServerExtension() {
@Override
protected void configure(ServerBuilder sb) throws Exception {
sb.annotatedService(new Object() {
@Get("/")
@MatchesParam("boardId")
@ProducesJson
public HttpResponse findAllForBoard(@Param Long boardId) {
return HttpResponse.of(200);
}
@Get("/")
@ProducesJson
@MatchesParam("name")
@MatchesParam("boardId")
public HttpResponse findByName(@Param String name, @Param Long boardId) {
return HttpResponse.of(201);
}
});
}
};
@Test
void testDuplicate() {
AggregatedHttpResponse res =
server.blockingWebClient().get("/",
QueryParams.of("boardId", "123"));
assertThat(res.status().code()).isEqualTo(200);
res = server.blockingWebClient().get("/",
QueryParams.of("name", "jrhee17",
"boardId", "123"));
assertThat(res.status().code()).isEqualTo(201);
} I do think it might be more helpful if:
Let me bring this up with the team in the next business day |
Beta Was this translation helpful? Give feedback.
Hi! We probably need to add a
MatchesParam
to avoid the duplicate route.I've confirmed the following works in my local env.