Re: [Specifications] Relative Template URIs (#208)

I'm sorry but you are just rambling now. Of course the template is part of the graph. We've had that for ages. But the resolved URL (the actual link target) is not. It is purely runtime artifact. Why? Because same template can be used in multiple contexts (subjects) and the resulting URLs might be different.

> I'm somehow against the one provided by the API - we should stick to RFCs and document URLs'

Right, so a second, default (?) option would be to resolve against the effective URI of the request, correct?

I have in mind a scenario in which an API is hosted under a virtual dir, say, `/tenant/api/`. All relative templates would be resolved against that. Even if the base changes, the API will not have to change all the templates.

```turtle
</tenant/api> a hydra:ApiDocumentation; hydra:baseUri </tenant/api/> .

</person> some:link [
  a hydra:IriTemplate ;
  hydra:template "person{?name}" # for example </tenant/api/person?name=foo>
] .
```

This would in fact be similar to `@base` at the serialisation level.

-- 
GitHub Notification of comment by tpluscode
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/208#issuecomment-619768347 using your GitHub account

Received on Monday, 27 April 2020 06:51:52 UTC