📖 Documentation · 📦 springdoc-openapi · 🚀 Getting started · ⚙️ Properties · ❓ FAQ
If you ❤️ springdoc-openapi, become a sponsor: it covers the project expenses and helps it grow.
This repository holds the demo applications of springdoc-openapi:
small Spring Boot applications that show how springdoc-openapi documents Web MVC, WebFlux, Spring Cloud and
MCP applications. Every push to master builds them and deploys the public ones, so you can try them right
now in your browser. ✨
| Demo | What it shows | Try it | Source |
|---|---|---|---|
| 🍃 Web MVC | A Spring Web MVC API documented with Swagger UI | 📂 | |
| ⚡ WebFlux | A reactive Spring WebFlux API documented with Swagger UI | 📂 | |
| 🎨 Web MVC and Scalar | The Web MVC demo with the Scalar API reference | 📂 | |
| 🎨 WebFlux and Scalar | The WebFlux demo with the Scalar API reference | 📂 | |
| 🔀 WebFlux functional endpoints | Router functions documented with springdoc's SpringdocRouteBuilder |
📂 | |
| 🔗 Spring HATEOAS | Hypermedia APIs with HAL links | 📂 | |
| ☁️ Spring Cloud Function, Web MVC | Functions exposed as REST endpoints | 📂 | |
| ☁️ Spring Cloud Function, WebFlux | Reactive functions exposed as REST endpoints | 📂 | |
| 🚪 Microservices | Spring Cloud Gateway, Eureka and Config, with the API docs of every service in one Swagger UI | 📂 | |
| 🤖 MCP server | Spring AI MCP Server: REST endpoints exposed as MCP tools for AI agents, with an MCP UI | 📂 | |
| 🔐 MCP authorization server | The OAuth 2 authorization server that secures the MCP demo | 📂 |
Tip
The demos run on Cloud Run and scale to zero: the first request after a quiet period can take a few seconds. ⏳
These samples are not deployed, but you can run them locally:
| Sample | What it shows |
|---|---|
| 📚 demo-book-service | A CRUD REST API with a global exception handler |
| 🧑 demo-person-service | Bean Validation constraints (@Valid, @NotBlank, @Size) in the generated schemas |
| 🗄️ demo-spring-data-rest | Spring Data REST repositories documented automatically |
| 🔐 demo-oauth2 | OAuth 2 resource servers, Web MVC and WebFlux, with an authorization server |
You need Java 17+ and Maven:
git clone https://github.com/springdoc/springdoc-openapi-demos.git
cd springdoc-openapi-demos
mvn -pl demo-spring-boot-webmvc spring-boot:runThen open the Swagger UI on the port set in the demo's application.yml (for this one 👉 http://localhost:8081).
| Branch | Spring Boot | springdoc-openapi |
|---|---|---|
🍃 master |
4.x | 3.x |
🍃 spring-boot-3 |
3.x | 2.x |
🍂 2.x |
2.x | 1.x |
- 📖 Read the springdoc-openapi documentation and the FAQ
- 🙋 Ask questions on Stack Overflow with the
springdoctag - 🐛 Report a problem with a demo in this repository's issues, and a problem with springdoc-openapi itself in its issues
Special thanks to the Spring team and JetBrains for their support.
The demos are Open Source software released under the Apache 2.0 license.


