damnhandy / Handy-URI-Templates

A Java URI Template processor implementing RFC6570

Home Page:https://damnhandy.github.io/Handy-URI-Templates/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use dash in query variable name.

yexela opened this issue · comments

UriTemplate.buildFromTemplate(API_SERVER)
                        .literal("/bs-core/clients/search/count-from")
                        .path(new VarSpec("from", Modifier.NONE))
                        .literal("/count-to")
                        .path(new VarSpec("amount", Modifier.NONE))
                        .query("fields-params")
                        .build();

causes MalformedUriTemplateException

Unfortunately, the - character is reserved in RFC6570. Please see issue #44 for details on this. Marking as Won't Fix but I am considering a relaxed mode which could allow for this.