A Python web framework for building type-hinted REST APIs on top of Django, with automatic OpenAPI docs and Pydantic validation.
springdoc/springdoc-openapi
Generates OpenAPI 3 documentation and Swagger UI or Scalar pages for Spring Boot apps by inspecting controllers at runtime.
Open-source alternative to:SpringFox
- Stars
- 3,747
- Forks
- 612
- Open issues
- 3
- Last commit
- yesterday
What is it?
springdoc-openapi is a Java library for Spring Boot applications that inspects controllers, configuration, validation annotations and Bean Validation constraints at runtime. It produces an OpenAPI 3 description served as JSON and YAML, along with an interactive Swagger UI or Scalar page. Adding a single starter dependency is enough to get started, with no required configuration.
The library supports Spring Web MVC and Spring WebFlux, including functional endpoints, and integrates with Spring Security, OAuth 2, Spring Data REST, Spring HATEOAS and Actuator. Kotlin, Groovy and Javadoc are supported, and it can expose an API as tools for AI agents through MCP. Maven and Gradle plugins can generate the description at build time, and GraalVM native images are supported.
The project targets Spring Boot 4.x on Java 17+. The 2.x line is kept for Spring Boot 3, and 1.x is no longer open-source supported.
Key features
- 01Generates OpenAPI 3 descriptions in JSON and YAML at runtime from Spring Boot code.
- 02Serves Swagger UI or Scalar pages for browsing the API.
- 03Supports Spring Web MVC, WebFlux and functional endpoints.
- 04Integrates with Spring Security, OAuth 2, Spring Data REST and HATEOAS.
- 05Reads Bean Validation annotations such as @NotNull, @Min, @Max and @Size.
- 06Offers Maven and Gradle plugins to generate the description at build time.
Use cases
- Documenting a REST API built with Spring Boot without writing the OpenAPI file by hand.
- Giving frontend or external teams an interactive page to try endpoints.
- Exposing a Spring API as tools for AI agents via MCP.
- Generating an OpenAPI file during the build for client code generation or contract checks.
In collections
Topics
FAQ
- What is springdoc-openapi?
- Generates OpenAPI 3 documentation and Swagger UI or Scalar pages for Spring Boot apps by inspecting controllers at runtime. springdoc-openapi is a Java library for Spring Boot applications that inspects controllers, configuration, validation annotations and Bean Validation constraints at runtime. It produces an OpenAPI 3 description served as JSON and YAML, along with an interactive Swagger UI or Scalar page. Adding a single starter dependency is enough to get started, with no required configuration.
- Is springdoc-openapi free to use? What license does it have?
- springdoc-openapi is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is springdoc-openapi still maintained?
- Actively maintained. The last commit to springdoc-openapi was on Nov 6, 2026.
- What can I use springdoc-openapi for?
- Documenting a REST API built with Spring Boot without writing the OpenAPI file by hand. Giving frontend or external teams an interactive page to try endpoints. Exposing a Spring API as tools for AI agents via MCP. Generating an OpenAPI file during the build for client code generation or contract checks.
- Where can I get springdoc-openapi?
- The source code and installation instructions are on GitHub: https://github.com/springdoc/springdoc-openapi
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Java library that generates OpenAPI specifications from code annotations and JAX-RS REST APIs, supporting OpenAPI 3.x.
Generates real Swagger/OpenAPI 2.0 specifications and interactive docs from Django REST Framework APIs.
Swagger UI renders interactive API documentation in the browser from an OpenAPI/Swagger specification file.
Open-source OpenAPI/Swagger toolkit with an interactive API reference, an offline-first API client, and integrations for many web frameworks.
Go tool that generates Swagger 2.0 API documentation from annotations written in your Go source code comments.