File tree 3 files changed +20
-6
lines changed
src/main/kotlin/me/misik/api/infra
3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,6 @@ h2Version=1.4.200
31
31
32
32
# ## Snowflake ###
33
33
snowflakeVersion =5.2.5
34
+
35
+ # ## SpringDoc ###
36
+ springDocVersion =2.3.0
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ dependencies {
7
7
implementation " org.springframework.boot:spring-boot-starter-web"
8
8
implementation " org.springframework.boot:spring-boot-starter-webflux"
9
9
implementation " org.springframework.boot:spring-boot-starter-data-jpa"
10
- implementation ' org.springframework.retry:spring-retry'
11
- implementation ' org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0 '
10
+ implementation " org.springframework.retry:spring-retry"
11
+ implementation " org.springdoc:springdoc-openapi-starter-webmvc-api: ${ springDocVersion } "
12
12
13
13
testImplementation " org.springframework.boot:spring-boot-starter-test"
14
14
}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package me.misik.api.infra
2
2
3
3
import io.swagger.v3.oas.models.OpenAPI
4
4
import io.swagger.v3.oas.models.info.Info
5
+ import io.swagger.v3.oas.models.servers.Server
5
6
import org.springframework.context.annotation.Bean
6
7
import org.springframework.context.annotation.Configuration
7
8
@@ -10,10 +11,20 @@ class SwaggerConfig {
10
11
11
12
@Bean
12
13
fun customOpenAPI (): OpenAPI {
14
+ val info = Info ()
15
+ .title(" Misik API" )
16
+ .version(" 1.0" )
17
+ .description(" Misik API Description" )
18
+
19
+ val server = Server ()
20
+ server.url = SWAGGER_URL
21
+
13
22
return OpenAPI ()
14
- .info(
15
- Info ().title(" Misik API" )
16
- .version(" 1.0" )
17
- .description(" Misik API Description" ))
23
+ .info(info)
24
+ .servers(listOf (server))
25
+ }
26
+
27
+ private companion object {
28
+ private const val SWAGGER_URL = " misik-api"
18
29
}
19
30
}
You can’t perform that action at this time.
0 commit comments