Re: [Specifications] Question about HATEOAS shortcuts (#189)

@tpluscode 
> This already presents a problem. The client should have no understanding that 123 is some kind of identifier. The only real identifier is the URL.
I don't remember writing that the client knows that 123 is an identifier. All the client knows that the URI is build with `{productId: 123}` and with an URI template. It assumes that the parameters of the template does not change when the URI changes, just the URI template itself. But nice catch, because that assumption does not have to hold. If so, then I think the only option to find that resource again is having some sort of service that converts to old link into the new one. I think that should be a bookmarking service sort of.
> Now this is not really the client's problem to solve. I'd say that the responsibility of a well-designed API is to provide redirects, at least for a certain period following the change. You could then monitor for incoming requests and once the requests for the "old" URLs drops below a "low enough" threshold, you would then remove them completely.
Yes, I think that is a good solution too. I think even better than having a service for this. Still I don't feel right. I mean in both cases it would be nice to notify somehow the client that the link is deprecated. Is there any option for that?



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

Received on Thursday, 18 April 2019 18:26:48 UTC