Re: URI Template: query param name different than variable name

On Feb 25, 2010, at 6:00 PM, Roy T. Fielding wrote:

> I removed the variable types from the template grammar and
> replaced them with explode modifiers ("*" or "+" at the end
> of a variable name) to indicate that the variable is a
> placeholder for some wider structured or schema-directed
> substitutions.  The goal here is to make the template as
> small as possible and let the variable name be explained
> outside the template, e.g.
> 
>   Link-Template: <http://example.com/find{?q,lang};
>        profile="http://opensearch.org/1.1";
>        map="q:searchTerms,lang:language"
> 
> or simply
> 
>   Link-Template: <http://example.com/find{?OpenSearch*};
>        profile="http://opensearch.org/1.1"

er, I forgot the closing angle brackets delimiting the
templates, but that's the idea.  This kind of profile use
would be defined in a specification of the Link-Template field
rather than in the template syntax document.  Likewise,
there might be some completely different way of expressing
the same thing within other contexts like WADL, XRD++, etc.

....Roy

Received on Friday, 26 February 2010 02:48:21 UTC