less than 1 minute read

In my previous article on how to add Swagger on Spring with Kotlin, the examples were built on Spring 2. With the introduction of Spring 3, there are some updates to the SpringDoc dependencies to use.

The previous dependencies were as such

dependencies {

The main dependency used is the springdoc-openapi-ui, which is to be replaced by springdoc-openapi-starter-webmvc-ui. Both the springdoc-openapi-data-rest and springdoc-openapi-kotlin can be replaced with just 1 other springdoc-openapi-starter-common, as described on https://springdoc.org/v2/#spring-data-rest-support and https://springdoc.org/v2/#kotlin-support.

So the new dependencies if you are using Spring 3 will be as such