You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# **Introduction to springdoc-openapi-gradle-plugin**
4
+
# Introducing springdoc-openapi-gradle-plugin
5
5
6
-
Spring Docs Open API Gradle Plugin - Generates OpenAPI-3 specification docs for spring boot application
6
+
Gradle plugin for springdoc-openapi.
7
7
8
-
This Gradle plugin provides the capability to generate OpenAPI-3 specification docs for spring boot application from a Gradle build.
9
-
The plugin does this with help of springdoc-openapi-core
8
+
This plugin allows you to generate an OpenAPI3 specification for a Spring Boot application from a Gradle build.
9
+
The plugin does this with help of springdoc-openapi-core.
10
10
11
11
Compatibility Notes
12
12
-------------------
13
13
14
-
The plugin is build on gradle version 6.1.
14
+
The plugin is built on Gradle version 6.1.
15
15
16
16
Dependencies
17
17
------------
18
-
This plugin has a runtime dependency on the the following plugins
18
+
This plugin has a runtime dependency on the the following plugins:
19
19
20
-
1. Spring boot gradle plugin - "org.springframework.boot"
21
-
2. Gradle process plugin - "com.github.johnrengelman.processes"
20
+
1. Spring Boot Gradle plugin - `org.springframework.boot`
21
+
2. Gradle process plugin - `com.github.johnrengelman.processes`
22
22
23
-
Hence these plugins also needs to be added to your gradle builds.
23
+
Hence these plugins also needs to be added to your Gradle builds.
24
24
25
-
Note: You will also need the springdocs-core jar file to be present in your spring boot application
25
+
Note: You will also need the springdoc-core jar file to be present in your Spring Boot application.
26
26
27
27
How To Use
28
28
----------
@@ -33,7 +33,7 @@ Gradle Groovy DSL
33
33
plugins {
34
34
id("org.springframework.boot") version "2.2.4.RELEASE"
35
35
id "com.github.johnrengelman.processes" version "0.5.0"
36
-
id("org.springdoc.openapi-gradle-plugin") version "1.0-SNAPSHOT"
36
+
id("org.springdoc.openapi-gradle-plugin") version "1.0.0"
37
37
}
38
38
```
39
39
@@ -42,24 +42,22 @@ Gradle Kotlin DSL
42
42
plugins {
43
43
id("org.springframework.boot") version "2.2.4.RELEASE"
44
44
id("com.github.johnrengelman.processes") version "0.5.0"
45
-
id("org.springdoc.openapi-gradle-plugin") version "1.0-SNAPSHOT"
45
+
id("org.springdoc.openapi-gradle-plugin") version "1.0.0"
46
46
}
47
47
```
48
48
49
-
Note: For latest versions of the plugins please check the gradle plugin portal
49
+
Note: For latest versions of the plugins please check the [Gradle Plugins portal](https://plugins.gradle.org/).
50
50
51
51
How the plugin works
52
52
------------
53
53
54
-
When the user add this plugin and its runtime dependency plugins to your build file
55
-
56
-
The plugin creates the following tasks
54
+
When you add this plugin and its runtime dependency plugins to your build file, the plugin creates the following tasks:
57
55
58
56
1. forkedSpringBootRun
59
57
60
58
2. generateOpenApiDocs
61
59
62
-
Running the task generateOpenApiDocs will generate the open api docs into a file openapi.jsonin your projects build dir
60
+
Running the task `generateOpenApiDocs` writes the OpenAPI spec into a `openapi.json` file in your project's build dir.
63
61
64
62
```bash
65
63
gradle clean generateOpenApiDocs
@@ -85,10 +83,10 @@ openApi {
85
83
86
84
Parameter | Description | Required | Default
87
85
--------- | ----------- | -------- | -------
88
-
`apiDocsUrl` | The url from where the open api docs can be downloaded | No | http://localhost:8080/v3/api-docs
89
-
`outputDir` | The output directory where the generated open api file would be placed | No | $buildDir - Your projects build dir
86
+
`apiDocsUrl` | The URL from where the OpenAPI doc can be downloaded | No | http://localhost:8080/v3/api-docs
87
+
`outputDir` | The output directory for the generated OpenAPI file | No | $buildDir - Your project's build dir
90
88
`outputFileName` | The name of the output file with extension | No | openapi.json
91
-
`waitTimeInSeconds` | Time to wait in seconds for your spring boot application to start, before we make calls to `apiDocsUrl` to download the openapi docs | No | 30 seconds
89
+
`waitTimeInSeconds` | Time to wait in seconds for your Spring Boot application to start, before we make calls to `apiDocsUrl` to download the OpenAPI doc | No | 30 seconds
0 commit comments