fix: Add support for the Deprecation header#7582
Conversation
d1d387e to
c860945
Compare
c860945 to
cfa7278
Compare
|
Interesting, note that we also have the but we don't support yet the Deprecation header (https://datatracker.ietf.org/doc/rfc9745/). By looking into this we should support web links through core/src/Metadata/HttpOperation.php Line 93 in 64768a6 like this it's easier to compose with multiple links, I note that we're missing some docs on this (and I don't see any functional test where user defines links so we may have a bug after all). |
|
This works with the link property of HttpOperation. This doesn't seem problematic; the type of link cannot be defined. I updated the unit test So, can the PR be closed, or should the "deprecation" property be promoted as a property of HttpOperation ? |
|
Thanks I'll merge the test anyway, maybe that we're missing some documentation on the subject I think |
Add support for the Deprecation header
Uses the headers property of the APIResource directly to send the headers.
It is not configured like the sunset header; the sunset header can also be overridden via the headers.
If both the sunset property and the header are configured, the sunset property takes precedence.
The developer experience is less enjoyable because it's necessary to ensure the correct formatting of date.
This can be seen as a bug fix because the header link could not be defined; it was being overridden by src/State/Processor/AddLinkHeaderProcessor.php