Skip Menu |

This queue is for tickets about the Mojolicious-Plugin-RESTRoutes CPAN distribution.

Report information
The Basics
Id: 94966
Status: resolved
Priority: 0/
Queue: Mojolicious-Plugin-RESTRoutes

People
Owner: jens [...] jebecs.de (daily)
Requestors: sierra [...] webrausch.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.010011



Subject: Routes with non-numeric ids not working
Date: Wed, 23 Apr 2014 16:34:44 +0200
To: bug-Mojolicious-Plugin-RESTRoutes [...] rt.cpan.org
From: André Lang <sierra [...] webrausch.de>
Routes do not match non-numeric ids, i.e. GET /api/users/123 --> My::Mojo::User::rest_show() is called GET /api/users/mustermann --> 404 error (route does not exist) I'm not quite sure if allowing non-numeric ids conflicts with chaining, but regarding RESTful-ness, non-numeric ids are allowed and should be supported. It took me some time to find out why I always got a 404 "route not found" when using your module as my URL was ok until I noticed that "qr/\d+/" filtering in the source.
Show quoted text
> It took me some time to find out why I always got a 404 "route not > found" when using your module as my URL was ok until I noticed that > "qr/\d+/" filtering in the source.
Hi André, sorry for my late answer on this topic - I didn't receive the bug report via mail. In the docs it says "Take care: IDs must be numeric!". Besides that - I meanwhile agree that non-numeric IDs should be possible and I'm currently working on it. Regards, Jens
Subject: Re: [rt.cpan.org #94966] Routes with non-numeric ids not working
Date: Thu, 22 Jan 2015 17:49:05 +0100
To: bug-Mojolicious-Plugin-RESTRoutes [...] rt.cpan.org
From: André Lang <sierra [...] webrausch.de>
Hi Jens, you're right, it's in the docs and I missed that line. Thanks for working on this issue anyway. André
Starting with v0.010011 non-numeric can be used in routes. The module documentation has also been updated to show how to retrieve the IDs.