New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route with dynamic part #248

Closed
obigard opened this Issue Jun 30, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@obigard

obigard commented Jun 30, 2014

Hi Clément,

I am trying to set a dynamic "Route" with regular expression in my very simple Wisdom Controller.
I am using the sample you put in the Wisdom documentation:


@Controller
@Path("/api/v1/participant")
public class SampleController extends DefaultController
{
    @Route(method = HttpMethod.GET, uri = "/{type<[0-9]+>}")
    public Result hello(@PathParameter("type") @DefaultValue("not valued...") String type)
    {
        return ok("For parameter: " + type);                           
    }
}

When calling the Rest API above (GET: http://localhost:9000/api/v1/participant/99), the displayed result is always "For parameter: not valued..." instead of "For parameter: 99"...

What am I doing wrong?

Thanks in advance
Olivier

@cescoffier cescoffier added the bug label Jun 30, 2014

@cescoffier cescoffier added this to the 0.7 milestone Jun 30, 2014

@cescoffier cescoffier self-assigned this Jun 30, 2014

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Jun 30, 2014

Member

You did nothing wroong, but Wisdom does... It's a bug (I'm on it, a typo in the computed regex).

Member

cescoffier commented Jun 30, 2014

You did nothing wroong, but Wisdom does... It's a bug (I'm on it, a typo in the computed regex).

@cescoffier cescoffier modified the milestones: 0.6.1, 0.7 Jul 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment