REST api ambiguity and WADL
Posted
by JDonner
on Stack Overflow
See other posts from Stack Overflow
or by JDonner
Published on 2010-04-01T17:59:20Z
Indexed on
2010/04/01
18:03 UTC
Read the original article
Hit count: 650
I have a REST api that's ambiguous, something like (this isn't the specific problem, just gives an idea of the ambiguity):
/toplevel/${customer_number}/some_command/more stuff /toplevel/${customer_number}/${some_product_name_anything_goes}/more stuff
We've been getting away with it because our .htaccess file lists the more specific 'command' form before the general ${product_name} version, and the first match wins. Now though, we're writing a WADL, and, as you might expect, we're having trouble with our chosen tool consuming the WADL, because the API is ambiguous. My questions are:
a) Does the WADL spec speak to whether they can validly represent ambiguous APIs?
b) Tool support - in your experience, do tools choke on ambiguous WADLs? (if ambi. WADLs are allowed then those are weak tools but, you'd want to be on the safe side)
c) Just any experience with ambiguous REST apis, most especially wrt WADLs, really.
For the curious, here's the latest spec:
As far as I can tell it doesn't specifically address this, I guess it really comes down to how tools handle it.
Thanks.
© Stack Overflow or respective owner