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
Copy file name to clipboardExpand all lines: README.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,8 @@ Gradle Groovy DSL
25
25
26
26
```groovy
27
27
plugins {
28
-
id "org.springframework.boot" version "2.7.0"
29
-
id "org.springdoc.openapi-gradle-plugin" version "1.8.0"
28
+
id "org.springframework.boot" version "2.7.0"
29
+
id "org.springdoc.openapi-gradle-plugin" version "1.9.0"
30
30
}
31
31
```
32
32
@@ -35,7 +35,7 @@ Gradle Kotlin DSL
35
35
```groovy
36
36
plugins {
37
37
id("org.springframework.boot") version "2.7.0"
38
-
id("org.springdoc.openapi-gradle-plugin") version "1.8.0"
38
+
id("org.springdoc.openapi-gradle-plugin") version "1.9.0"
39
39
}
40
40
```
41
41
@@ -73,15 +73,23 @@ openApi as follows
73
73
74
74
```kotlin
75
75
openApi {
76
-
apiDocsUrl.set("https://localhost:9000/api/docs")
77
-
outputDir.set(file("$buildDir/docs"))
78
-
outputFileName.set("swagger.json")
79
-
waitTimeInSeconds.set(10)
80
-
groupedApiMappings.set(["https://localhost:8080/v3/api-docs/groupA" to "swagger-groupA.json",
81
-
"https://localhost:8080/v3/api-docs/groupB" to "swagger-groupB.json"])
82
-
customBootRun {
83
-
args.set(["--spring.profiles.active=special"])
84
-
}
76
+
apiDocsUrl.set("https://localhost:9000/api/docs")
77
+
outputDir.set(file("$buildDir/docs"))
78
+
outputFileName.set("swagger.json")
79
+
waitTimeInSeconds.set(10)
80
+
trustStore.set("keystore/truststore.p12")
81
+
trustStorePassword.set("changeit".toCharArray())
82
+
groupedApiMappings.set(
83
+
["https://localhost:8080/v3/api-docs/groupA" to "swagger-groupA.json",
84
+
"https://localhost:8080/v3/api-docs/groupB" to "swagger-groupB.json"]
85
+
)
86
+
customBootRun {
87
+
args.set(["--spring.profiles.active=special"])
88
+
}
89
+
requestHeaders = [
90
+
"x-forwarded-host":"custom-host",
91
+
"x-forwarded-port":"7000"
92
+
]
85
93
}
86
94
```
87
95
@@ -91,8 +99,11 @@ openApi {
91
99
|`outputDir`| The output directory for the generated OpenAPI file | No | $buildDir - Your project's build dir |
92
100
|`outputFileName`| Specifies the output file name. | No | openapi.json |
93
101
|`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 |
102
+
|`trustStore`| Path to a trust store that contains custom trusted certificates. | No |`<None>`|
103
+
|`trustStorePassword`| Password to open Trust Store | No |`<None>`|
94
104
|`groupedApiMappings`| A map of URLs (from where the OpenAPI docs can be downloaded) to output file names | No |[]|
95
105
|`customBootRun`| Any bootRun property that you would normal need to start your spring boot application. | No | (N/A) |
106
+
|`requestHeaders`| customize Generated server url, relies on `server.forward-headers-strategy=framework`| No | (N/A) |
96
107
97
108
### `customBootRun` properties examples
98
109
@@ -134,6 +145,20 @@ openApi {
134
145
}
135
146
```
136
147
148
+
### Trust Store Configuration
149
+
150
+
If you have restricted your application to HTTPS only and prefer not to include your certificate
151
+
in Java's cacerts file, you can configure your own set of trusted certificates through plugin
152
+
properties, ensuring SSL connections are established.
153
+
154
+
#### Generating a Trust Store
155
+
156
+
To create your own Trust Store, utilize the Java keytool command:
0 commit comments