Interface ApiVersionDeprecationHandler
- All Known Implementing Classes:
StandardApiVersionDeprecationHandler
public interface ApiVersionDeprecationHandler
Contract to add handling of requests with a deprecated API version. Typically,
this involves use of response headers to send hints and information about
the deprecated version to clients.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleVersion(Comparable<?> version, Object handler, ServerWebExchange exchange) Check if the requested API version is deprecated, and if so handle it accordingly, e.g.
-
Method Details
-
handleVersion
Check if the requested API version is deprecated, and if so handle it accordingly, e.g. by setting response headers to signal the deprecation, to specify relevant dates and provide links to further details.- Parameters:
version- the resolved and parsed request versionhandler- the handler chosen for the exchangeexchange- the current exchange
-