Springdoc OpenApi3 Swagger

When working as a backend engineer, it is essential to document the REST APIs. It also helps in providing a UI(swagger-ui) to test the REST calls. Let us try to integrate springdoc-openapi to provide swagger documentation for a spring boot project using spring-security(OAuth2). Add the dependencies to build.gradle 1 2 3 implementation("org.springdoc:springdoc-openapi-ui:1.6.8") implementation("org.springdoc:springdoc-openapi-security:1.6.8") implementation("org.springdoc:springdoc-openapi-kotlin:1.6.8") Kotlin code example The following example showcases spring configuration to create OpenAPI bean which supports two authentication mechanism:...