Re: [Specifications] Introduce something like hydra:memberTemplate

> I'm still wondering whether separate predicate is really necessary. Indeed it will shorten the syntax and enforce some extra logic, but would it make the existing IriTemplate obsolete/forbiden for collections?

As I understand in definition of `hydra:memberTemplate` we could include
```ttl
hydra:memberTemplate rdfs:range hydra:IrITemplate .
```
similar to http://www.hydra-cg.com/spec/latest/core/#hydra:search
Please also notice in http://www.hydra-cg.com/spec/latest/core/#the-hydra-core-vocabulary-in-json-ld
```ttl
hydra:search a hydra:TemplatedLink .
```


So based on your snippet we still get
```ttl
</api/events> a hydra:Collection;
    hydra:memberTemplate [
        a hydra:IriTemplate ;
        hydra:template "/api/events/{id}";
        hydra:variable "id";
        hydra:property some:property
    ] .
hydra:memberTempate a hydra:TemplatedLink .
```

With defining it in hydra namespece, we improve interoperability. Clients like Herakles.ts would not understand meaning of `api:member`, Herakles.ts could just undertand the `api:member a hydra:Link .` but other then that it woudn't tell difference in meaning between `api:member` and `foo:bar`

Also `hydra:TemplatedLink` seems more accurate for `hydra:memberTemplate` than `hydra:Link` which you suggested for `api:member`. With all this in mind looking at what you propose

```diff
</api/events> a hydra:Collection;
-   hydra:memberTemplate [
+   api:member [
        a hydra:IriTemplate;
        hydra:template "/api/events/{id}";
        hydra:variable "id";
        hydra:property some:property 
    ] .
-hydra:memberTempate a hydra:TemplatedLink .
+api:member a hydra:Link .
```
I don't see what you propose as improvement but contrary.

-- 
GitHub Notification of comment by elf-pavlik
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/16#issuecomment-341688150 using your GitHub account

Received on Friday, 3 November 2017 12:18:31 UTC