damnhandy / Handy-URI-Templates

A Java URI Template processor implementing RFC6570
https://damnhandy.github.io/Handy-URI-Templates/
Other
203 stars 37 forks source link

Can't use dash in query variable name. #58

Closed yexela closed 7 years ago

yexela commented 7 years ago
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

damnhandy commented 7 years ago

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.