This library contains a set of Spring Boot components used across HMCTS APIs.
Removes sensitive headers before they are added to Spring trace.
In order to use this filter declare the following Bean in your app:
@Bean
public RequestTraceFilter requestTraceFilter(TraceRepository traceRepository, TraceProperties traceProperties) {
return new RequestTraceFilter(traceRepository, traceProperties, <your_custom_headers_go_here>);
}An annotation for controller classes and methods that adds warning headers to the responses generated by the API.
A typical usage would be to add the @APIDeprecated annotation to a method as in the following example:
@APIDeprecated(
name = "Deprecated Endpoint",
expiryDate = "2018-06-30",
docLink = "https://example.org/docs/foo",
note = "Some note."
)
public Model someAction() {
// request handling code ...
}The annotation has the attributes that are used for forming a Warning header.
namefor friendly name of the endpoint,expiryDatefor the date which the endpoint will cease to serve,docLinkfor the details of documentation regarding the API updatesnotefor optional notes to the clients
A sample of the Warning header is as follows:
The UserProfileEndpoint is deprecated and will be removed by 2018-06-30. Please see https://example.org/docs/foo for details. Some note.