Class ApiVersionConfiguration
java.lang.Object
nl.b3p.planmonitorwonen.api.configuration.ApiVersionConfiguration
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
public class ApiVersionConfiguration
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Versioning of the API. The major version is a path segment after the base path:
/api/planmonitor-wonen/v2/planregistraties. A new major version means backwards-incompatible changes. The
full version (major.minor, the minor version is increased for backwards-compatible additions) is in the
"API-Version" response header and the OpenAPI documentation, which also describes this policy (see
OpenApiConfiguration).
The API version is separate from the version of the application. It starts at 2 because version 1 is the unversioned API used by earlier releases.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) voidconfigureApiVersioning(org.springframework.web.servlet.config.annotation.ApiVersionConfigurer configurer) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Field Details
-
MAJOR_VERSION
Major version as used in theversionattribute of the request mappings. The version parser ignores the "v", but springdoc puts it in the paths of the OpenAPI documentation as is.- See Also:
-
VERSION
- See Also:
-
VERSION_HEADER
- See Also:
-
-
Constructor Details
-
ApiVersionConfiguration
-
-
Method Details
-
configureApiVersioning
public void configureApiVersioning(org.springframework.web.servlet.config.annotation.ApiVersionConfigurer configurer) - Specified by:
configureApiVersioningin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) - Specified by:
addInterceptorsin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-