360i/sonno — Issue #15: Unable to use multiple PathParams
Author: chaosprime
Created: 2012-02-16 22:45:05+00:00
State: open

With these annotations:

@Path("/list/paged/{size}/{page}")
@PathParam("size")
@PathParam("page")

only the first PathParam is added to the route object when it's constructed, so the $page value comes in as null. The router actually successfully processes both parameters based on the {} pattern in _matchPath(), but that parameter extraction is discarded and a new one is apparently constructed later, based on the contents of the route object's _pathParams property, which is only getting the size param from the annotations. It looks like what's necessary is telling the annotation reader that PathParam should build an array; I have no idea how to do that. Since it's the first PathParam that comes through, not the last, it's not doing in-order replacement of the values found, so it's not really clear to me what its deal is.

(It would also be nice if the path could be /list/paged/size{size}/page{page}. Right now if you do that, the whole string, e.g. 'size10', comes through, not just the number.)