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

I view the URI template as a black box. How it looks like, and how it's constructed is opaque to a consumer, besides which parameters it accepts. Once the required parameters are assembled, they are passed to the black box and out comes a fully constructed (possibly relative) URI.

Since the purpose of the constructed URI is to perform an HTTP request and not to reason about the relationship between two resources, I agree with @tpluscode that the "black box" (opaque string) URI template belongs to the graph, while the constructed URI does not.

If we view the URI template as a function, the function itself is a part of the graph. But the function's return value is a runtime concern that in theory can change on every invocation of the function and thus isn't something that can exist as a part of the graph or API description.

If the constructed URI is relative, it's up to the Hydra client to resolve it according to processing rules that are outside of both scope and control of the serialization format used to communicate the template.

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

Received on Monday, 27 April 2020 09:48:25 UTC