You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When JsonLdHypermediaProcessor flattens the payload it should probably always use context provided to the client by the developer using the client and never the one from the payload returned from the server.
Developer using a client has to have full control over JSON-LD context used to flatten paylad to use aliases from that context in the code. Context in the payload (response from the server) should stay considered as not under control of the developer using client and the code should not make any assumptions about that context and only rely on context directly provided to the client by the developer.
Ahh. It was some time ago, but I think this was to force either framing or flattening to enforce those urls. For some reason these were incorrectly processed.
The text was updated successfully, but these errors were encountered:
It is not ignored - in default behavior JsonLdHypermediaProcessor uses original response as it's result. It still uses it's own context to frame that response (effectively copying it) so it can obtain hypermedia, which are then added as an extension of the original payload (hypermedia property).
The original resource is untouched leaving full power to the developer.
It still uses it's own context to frame that response (effectively copying it) so it can obtain hypermedia, which are then added as an extension of the original payload (hypermedia property).
Makes sense, since client uses its build in context to frame content for hypermedia property value, for that part context from the payload gets ignored.
The original resource is untouched leaving full power to the developer.
👍 let's discuss in other issues and PR if client should provide some interfaces to work with the payload beyond attaching hyperedia interface to it. Then this issue of not assuming in the code anything about JSON-LD context from the payload will come up again.
When
JsonLdHypermediaProcessor
flattens the payload it should probably always use context provided to the client by the developer using the client and never the one from the payload returned from the server.Developer using a client has to have full control over JSON-LD context used to flatten paylad to use aliases from that context in the code. Context in the payload (response from the server) should stay considered as not under control of the developer using client and the code should not make any assumptions about that context and only rely on context directly provided to the client by the developer.
Possibly related to what @alien-mcl mentioned in #11 (comment)
The text was updated successfully, but these errors were encountered: