Re: Moving forward with hydra:filter (ISSUE-45)

Hi Dietrich

>>>> Well, first of all - not all variables needs to be replaced. Consider 
>>>> query string parameters - these are usually optional 
>>>what makes you think so? 
>>>hydra:next </gadgets?page=4> 
>>>;-) 
>> Well, call to /gadgets is as valid as the one with ?page=4. 
>Agreed, but in order to be the :next link, the query param can't be dropped. In that sense it is required, and even has a fixed value - a uritemplate can express a fixed value and still allow addtl params with a query continuation such as ?foo=12{&bar}. 
As for the uri template I agree – it can do all of this you mentioned and enought of this :p.
But I disagree when it comes to how the hydra:next relation affect the link. Spec doesn’t imply anything on it’s structure, thus there is nothing that prevents a server from doing that:
GET /gadgets –>
</gadgets> hydra:view [
    hydra:first </gadgets> ;
    hydra:next </whatever-page-url-I-want-you-to-treat-as-a-next-page> ;
    hydra:last </peekaboo-I-see-you> ;
] .

Yes, it’s stupid and irrational to do so, but client is supposed to blindly follow those links as these as “just” links (not even templated ones).

Regards

Karol

Received on Sunday, 1 November 2015 13:54:29 UTC