Library for OpenAPI 3 with spring-boot
3,736
stars
2,854
commits
Java
primary language
Sep 6, 2026
updated
springdoc-openapi is on Open Collective. If
you ❤️ this project consider becoming a sponsor.
This project is sponsored by
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
springdoc-openapi follows Semantic Versioning. MAJOR version increments are released in lockstep with Spring Boot MAJOR releases and may include incompatible/breaking changes. MINOR and PATCH releases follow standard SemVer conventions for backwards-compatible features and fixes, respectively. See CHANGELOG.md for the full release history.
The springdoc-openapi Java library helps automating the generation of API documentation using Spring Boot projects. springdoc-openapi works by examining an application at runtime to infer API semantics based on Spring configurations, class structure and various annotations.
The library automatically generates documentation in JSON/YAML and HTML formatted pages.
The generated documentation can be complemented using swagger-api annotations.
This library supports:
The following video introduces the Library:
For Spring-boot v4 support, make sure you use springdoc-openapi v3
This is a community-based project, not maintained by the Spring Framework Contributors ( Pivotal)
server: The server name or IPport: The server portcontext-path: The context path of the application/v3/api-docs.yamlspringdoc-openapi-ui library to the list of your project dependencies (No
additional configuration is needed):Maven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest'
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html

server: The server name or IPport: The server portcontext-path: The context path of the application/v3/api-docs.yamlMaven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest'
# /api-docs endpoint custom path
springdoc.api-docs.path=/api-docs
springdoc-openapi endpoints, add a
custom springdoc property, in your spring-boot configuration file:# disable api-docs
springdoc.api-docs.enabled=false
To generate documentation automatically, make sure all the methods declare the HTTP Code responses using the annotation: @ResponseStatus.
The library uses spring-boot application auto-configured packages to scan for the
following annotations in spring beans: OpenAPIDefinition and Info.
These annotations declare, API Information: Title, version, licence, security, servers,
tags, security and externalDocs.
For better performance of documentation generation, declare @OpenAPIDefinition
and @SecurityScheme annotations within a Spring managed bean.
Maven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:latest'
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html
The springdoc-openapi libraries are hosted on maven central repository.
The artifacts can be viewed accessed at the following locations:
Releases:
Snapshots:
Some Spring Boot apps run Actuator on a separate management port. In that case:
Application port (e.g., 8080) serves your app and springdoc endpoints:
http://localhost:8080/v3/api-docshttp://localhost:8080/swagger-ui/index.htmlManagement port (e.g., 9090) serves Actuator:
http://localhost:9090/actuatorhttp://localhost:9090/actuator/healthMinimal application.yml:
server:
port: 8080
management:
server:
port: 9090
endpoints:
web:
exposure:
include: health,info
# springdoc is enabled by default with the starter;
# endpoints remain on the application port.
# (OpenAPI JSON = /v3/api-docs, Swagger UI = /swagger-ui/index.html)
With Spring Boot 3, /v3/api-docs and Swagger UI are served on the application port, while Actuator runs on the management port.
If Spring Security is enabled, explicitly permit the docs paths on the application port:
@Bean
SecurityFilterChain api(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(auth -> auth
.requestMatchers(
"/v3/api-docs/**",
"/v3/api-docs.yaml",
"/swagger-ui/**",
"/swagger-ui.html"
).permitAll()
.anyRequest().authenticated()
);
return http.build();
}
springdoc-openapi is relevant and updated regularly due to the valuable contributions from its contributors.
Thank you all for your support!
(top 30 of 118)
Java
97.1%
Kotlin
1.7%
TypeScript
1.1%
Library for OpenAPI 3 with spring-boot
3,736
stars
2,854
commits
Java
primary language
Sep 6, 2026
updated
springdoc-openapi is on Open Collective. If
you ❤️ this project consider becoming a sponsor.
This project is sponsored by
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
springdoc-openapi follows Semantic Versioning. MAJOR version increments are released in lockstep with Spring Boot MAJOR releases and may include incompatible/breaking changes. MINOR and PATCH releases follow standard SemVer conventions for backwards-compatible features and fixes, respectively. See CHANGELOG.md for the full release history.
The springdoc-openapi Java library helps automating the generation of API documentation using Spring Boot projects. springdoc-openapi works by examining an application at runtime to infer API semantics based on Spring configurations, class structure and various annotations.
The library automatically generates documentation in JSON/YAML and HTML formatted pages.
The generated documentation can be complemented using swagger-api annotations.
This library supports:
The following video introduces the Library:
For Spring-boot v4 support, make sure you use springdoc-openapi v3
This is a community-based project, not maintained by the Spring Framework Contributors ( Pivotal)
server: The server name or IPport: The server portcontext-path: The context path of the application/v3/api-docs.yamlspringdoc-openapi-ui library to the list of your project dependencies (No
additional configuration is needed):Maven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest'
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html

server: The server name or IPport: The server portcontext-path: The context path of the application/v3/api-docs.yamlMaven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:latest'
# /api-docs endpoint custom path
springdoc.api-docs.path=/api-docs
springdoc-openapi endpoints, add a
custom springdoc property, in your spring-boot configuration file:# disable api-docs
springdoc.api-docs.enabled=false
To generate documentation automatically, make sure all the methods declare the HTTP Code responses using the annotation: @ResponseStatus.
The library uses spring-boot application auto-configured packages to scan for the
following annotations in spring beans: OpenAPIDefinition and Info.
These annotations declare, API Information: Title, version, licence, security, servers,
tags, security and externalDocs.
For better performance of documentation generation, declare @OpenAPIDefinition
and @SecurityScheme annotations within a Spring managed bean.
Maven
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
<version>last-release-version</version>
</dependency>
Gradle
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:latest'
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html
The springdoc-openapi libraries are hosted on maven central repository.
The artifacts can be viewed accessed at the following locations:
Releases:
Snapshots:
Some Spring Boot apps run Actuator on a separate management port. In that case:
Application port (e.g., 8080) serves your app and springdoc endpoints:
http://localhost:8080/v3/api-docshttp://localhost:8080/swagger-ui/index.htmlManagement port (e.g., 9090) serves Actuator:
http://localhost:9090/actuatorhttp://localhost:9090/actuator/healthMinimal application.yml:
server:
port: 8080
management:
server:
port: 9090
endpoints:
web:
exposure:
include: health,info
# springdoc is enabled by default with the starter;
# endpoints remain on the application port.
# (OpenAPI JSON = /v3/api-docs, Swagger UI = /swagger-ui/index.html)
With Spring Boot 3, /v3/api-docs and Swagger UI are served on the application port, while Actuator runs on the management port.
If Spring Security is enabled, explicitly permit the docs paths on the application port:
@Bean
SecurityFilterChain api(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests(auth -> auth
.requestMatchers(
"/v3/api-docs/**",
"/v3/api-docs.yaml",
"/swagger-ui/**",
"/swagger-ui.html"
).permitAll()
.anyRequest().authenticated()
);
return http.build();
}
springdoc-openapi is relevant and updated regularly due to the valuable contributions from its contributors.
Thank you all for your support!
(top 30 of 118)
Java
97.1%
Kotlin
1.7%
TypeScript
1.1%