This could be, centrally configured deprecation information by version. It would be added to a response to endpoints for the deprecated version.

There are two relevant specs:

  • RFC 9745 The Deprecation HTTP Response Header Field
  • RFC 8594 The Sunset HTTP Header Field

We could support use of those, but also leave it flexible to customize.

Comment From: bond-

@rstoyanchev Does this also cover WebClient throwing warning/error logs if it encounters a Deprecation/Sunset header?

Comment From: rstoyanchev

There is no client support at this time. I don't think exception are warranted. Logging is easily and better integrated into existing interceptors that do request logging.

Comment From: bond-

@rstoyanchev sorry for the incorrect language. I didn't mean throw exceptions.

Just logging messages is all? To warn the caller of Deprecation or Sunset

Comment From: rstoyanchev

I'm not sure it's worth introducing abstractions just for that. We'll keep an open mind but at the moment I don't see enough value we can add.

Comment From: bond-

@rstoyanchev let me present a case. Let's say I am a API developer and I want to warn all of my API users of upcoming Deprecation/Sunset. Some of these users use a RestClient or Webclient in their springboot code.

Not all of my users read notifications, some will raise a P1 saying, 'hey why did you not inform me about this? 🙃'.