TLDR: Modern Swagger UI for your Open Api specification in Spring Boot services.
-
you have OpenApi Specification file for your API;
-
you use OpenApi Code Generator plugin;
-
you want Swagger UI to be based on original OpenApi Specification file;
-
you like how RapiDoc UI looks like;
-
you have Spring Boot application.
Or have a look here: https://rapidocweb.com/examples/petstore-extended.html
-
[Important] Remove SpringDoc and Swagger UI dependencies
Make sure that there is no
org.springdoc : springdoc-openapi-uiandorg.webjars : swagger-uidependencies on classpath. -
Add dependency
com.playtika : rapidoc-spring-boot<dependency> <groupId>com.playtika</groupId> <artifactId>rapidoc-spring-boot</artifactId> <version>insert_version_here</version> </dependency>
-
Configure properties
Property Description Default value openapi.rapidoc.enabledEnables/disables autoconfiguration for Rapidoc.
trueopenapi.rapidoc.open-api-spec.file-nameName of the Open Api Spec file.
openapi.yamlopenapi.rapidoc.open-api-spec.pathPath to the Open Api Spec file inside
/src/main/resourcesfolder./openapi/
Library exposes the following endpoints:
-
/v3/api-docs— provides Open Api Specification file; -
/swagger-ui.html— provides RapiDoc UI for the Open Api Specification.
Demo project is located in module rapidoc-spring-boot-demo. Start application and hit http://localhost:8080/swagger-ui.html in browser.
