https://github.com/springdoc/springdoc-openapi-maven-plugin
Library for OpenAPI 3 with spring-boot
https://github.com/springdoc/springdoc-openapi-maven-plugin
Last synced: 10 months ago
JSON representation
Library for OpenAPI 3 with spring-boot
- Host: GitHub
- URL: https://github.com/springdoc/springdoc-openapi-maven-plugin
- Owner: springdoc
- License: apache-2.0
- Created: 2019-09-07T20:52:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-01T16:07:00.000Z (about 2 years ago)
- Last Synced: 2024-04-13T21:47:59.739Z (almost 2 years ago)
- Language: Java
- Homepage: https://springdoc.org
- Size: 279 KB
- Stars: 129
- Watchers: 7
- Forks: 34
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://ci-cd.springdoc.org:8443/view/springdoc-openapi/job/springdoc-openapi-maven-plugin-release/)
## **Introduction to springdoc-openapi-maven-plugin**
The aim of springdoc-openapi-maven-plugin is to generate json and yaml OpenAPI description during runtime. If you want to get swagger definitions properly, the application should completely running as locally.
The plugin works during integration-tests phase, and generate the OpenAPI description.
The plugin works in conjunction with spring-boot-maven plugin.
You can test it during the integration tests phase using the maven command:
```shell
mvn verify
```
In order to use this functionality, you need to add the plugin declaration on the plugins section of your pom.xml:
```xml
org.springframework.boot
spring-boot-maven-plugin
2.3.4.RELEASE
-Dspring.application.admin.enabled=true
pre-integration-test
start
post-integration-test
stop
org.springdoc
springdoc-openapi-maven-plugin
1.1
integration-test
generate
```
## **Custom settings of the springdoc-openapi-maven-plugin**
It possible to customise the following plugin properties:
* attachArtifact: install / deploy the api doc to the repository
* The default value is: false
* apiDocsUrl: The local url of your (json or yaml).
* The default value is: http://localhost:8080/v3/api-docs
* outputDir: The output directory, where to generate the OpenAPI description. The directory name shouldn't start with "/".
* The default value is: ${project.build.directory}
* outputFileName: The file name that contains the OpenAPI description.
* The default value is: openapi.json
* skip: Skip execution if set to true.
* The default value is: false
* headers: List of headers to send in request
* The default value is empty
```xml
org.springdoc
springdoc-openapi-maven-plugin
1.1
integration-test
generate
http://localhost:8080/v3/api-docs
openapi.json
home/springdoc/maven-output
false
header1value
header2value
```
# **Thank you for the support**
* Thanks a lot [JetBrains](https://www.jetbrains.com/?from=springdoc-openapi) for supporting springdoc-openapi project.
