URI Templates - the missing pieces

Hello Hydra

There has been a heated discussion about views recently and it made me think about templates in general. I raised some issues in my reply to Maxim [1]. I'd like to star a separate conversion to set some things straight.

First issue I realized was with the property, um, property of a template mapping. I was surprised that in the context of filters/views it is assumed to relate to the collection members' properties. The reason is that I've only ever encountered the mapping in templated links and never understood what it was really for. In the specs there is an example with "property": "hydra:freetextQuery". Obviously hydra:freetextQuery is not a property of the resource. This will create confusion, because the property has a different meaning in links and views. Thus maybe property should not be used with templated links, or am I not seeing something? 

Next, I think we need a way to instruct the client what is valid input for a property. There has been a number of related discussions and there is issue 82 [2]. We definitely need a way to tell the client what the server expects as parameter input. Some ideas include datatype restrictions (eg. datatype, numeric ranges, string maximum length), enumerations of a set of values or values retrieved from external resources (think autocomplete input). Cardinality also applies here. Such mechanism would have to be applicable not only to template parameters but also SupportedProperties as suggested in issue 82.

Thanks,
Tom

[1]: http://lists.w3.org/Archives/Public/public-hydra/2016Feb/0065.html
[2]: https://github.com/HydraCG/Specifications/issues/82

Received on Sunday, 14 February 2016 17:46:47 UTC