aspnet-api-versioning icon indicating copy to clipboard operation
aspnet-api-versioning copied to clipboard

Support for the "Deprecation" Response Header (RFC 9745)

Open roughconsensusandrunningcode opened this issue 7 months ago • 0 comments
trafficstars

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Supporting the Deprecation Response Header and the Deprecation Link Relation Type for deprecated API version, as specified in RFC 9745

Describe the solution you'd like

A configurable Deprecation Policy, similar to Sunset Policy, like this

options.Policies.Deprecation(0.9)
  .Effective(2025, 3, 31)
  .Link("https://developer.example.com/deprecation")
    .Type("text/html");

that will produce as response headers

Deprecation: @1743379200
Link: <https://developer.example.com/deprecation>; rel="deprecation"; type="text/html"

Additional context

No response