Skip to content

Mandatory parameter/header is missing: name #5202

Answered by jrhee17
evgeny-mordyasov asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! We probably need to add a MatchesParam to avoid the duplicate route.

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 f…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@evgeny-mordyasov
Comment options

Answer selected by evgeny-mordyasov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants