Skip to content

About

Demo for OpenAPI 3 with spring-boot

Resources

Stars

595 stars

Watchers

14 watching

Forks

Latest commit

 

History

961 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

springdoc-openapi

🎮 Live demos and sample applications for springdoc-openapi

Demos deploy Build springdoc-openapi on Maven Central License GitHub stars

Spring Boot 4.1 Java 17+ Swagger UI Scalar MCP with Spring AI

📖 Documentation · 📦 springdoc-openapi · 🚀 Getting started · ⚙️ Properties · ❓ FAQ

💖 Sponsored by

Mercedes-Benz    dmTECH    Contrast Security    LVM Versicherung    GDNext

Sponsor on GitHub Support on Open Collective

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. ✨

Swagger UI generated by springdoc-openapi

🌐 Live demos

Demo What it shows Try it Source
🍃 Web MVC A Spring Web MVC API documented with Swagger UI ▶️ Open 📂
⚡ WebFlux A reactive Spring WebFlux API documented with Swagger UI ▶️ Open 📂
🎨 Web MVC and Scalar The Web MVC demo with the Scalar API reference ▶️ Open 📂
🎨 WebFlux and Scalar The WebFlux demo with the Scalar API reference ▶️ Open 📂
🔀 WebFlux functional endpoints Router functions documented with springdoc's SpringdocRouteBuilder ▶️ Open 📂
🔗 Spring HATEOAS Hypermedia APIs with HAL links ▶️ Open 📂
☁️ Spring Cloud Function, Web MVC Functions exposed as REST endpoints ▶️ Open 📂
☁️ Spring Cloud Function, WebFlux Reactive functions exposed as REST endpoints ▶️ Open 📂
🚪 Microservices Spring Cloud Gateway, Eureka and Config, with the API docs of every service in one Swagger UI ▶️ Open 📂
🤖 MCP server Spring AI MCP Server: REST endpoints exposed as MCP tools for AI agents, with an MCP UI ▶️ Open 📂
🔐 MCP authorization server The OAuth 2 authorization server that secures the MCP demo ▶️ Open 📂

Tip

The demos run on Cloud Run and scale to zero: the first request after a quiet period can take a few seconds. ⏳

📦 More samples

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

🏃 Run a demo locally

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:run

Then open the Swagger UI on the port set in the demo's application.yml (for this one 👉 http://localhost:8081).

🧭 Branches

Branch Spring Boot springdoc-openapi
🍃 master 4.x 3.x
🍃 spring-boot-3 3.x 2.x
🍂 2.x 2.x 1.x

💬 Getting help

🙏 Thanks

Special thanks to the Spring team and JetBrains for their support.

JetBrains logo

📄 License

The demos are Open Source software released under the Apache 2.0 license.

About

Demo for OpenAPI 3 with spring-boot

Resources

Stars

595 stars

Watchers

14 watching

Forks

Releases

Packages

Used by

Contributors

Languages