Skip to content

Commit

Permalink
corrected after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed May 15, 2024
1 parent 6e00546 commit a95cce0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,15 @@ spec:
## 2.9.0
+ Migrated to th2 gradle plugin `0.0.6`
+ Updated bom: `4.6.1-dev`
+ Updated cradle api: `5.3.0-dev`
+ Updated common: `5.11.0-dev`
+ Updated micrometer-bom: `1.12.5`
+ Updated jetty-bom: `11.0.20`
+ Added swagger library
+ Updated:
+ bom: `4.6.1-dev`
+ cradle api: `5.3.0-dev`
+ common: `5.11.0-dev`
+ micrometer-bom: `1.12.5`
+ jetty-bom: `11.0.20`
+ javalin: `5.6.5`
+ javalin-openapi: `5.6.4`

## 2.7.0

Expand Down
7 changes: 3 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ dependencies {
implementation(libs.javalin.openapi.plugin) {
because("for /openapi route with JSON scheme")
}
// swagger-ui-3.52.5.jar (pkg:maven/org.webjars/[email protected]) : CVE-2018-25031
// implementation("io.javalin.community.openapi:javalin-swagger-plugin:$javalin") {
// because("for Swagger UI")
// }
implementation(libs.javalin.swagger.plugin) {
because("for Swagger UI")
}
implementation(libs.javalin.redoc.plugin) {
because("for Re Doc UI")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import io.javalin.openapi.plugin.OpenApiPlugin
import io.javalin.openapi.plugin.OpenApiPluginConfiguration
import io.javalin.openapi.plugin.redoc.ReDocConfiguration
import io.javalin.openapi.plugin.redoc.ReDocPlugin
//import io.javalin.openapi.plugin.swagger.SwaggerConfiguration
//import io.javalin.openapi.plugin.swagger.SwaggerPlugin
import io.javalin.openapi.plugin.swagger.SwaggerConfiguration
import io.javalin.openapi.plugin.swagger.SwaggerPlugin
import io.javalin.validation.JavalinValidation
import io.micrometer.core.instrument.Clock
import io.micrometer.core.instrument.Tag
Expand Down Expand Up @@ -171,7 +171,7 @@ class HttpServer(private val context: Context) {

setupOpenApi(it, externalContextPath)

// setupSwagger(it)
setupSwagger(it)

setupReDoc(it, externalContextPath)
}.apply {
Expand Down Expand Up @@ -202,10 +202,10 @@ class HttpServer(private val context: Context) {
it.plugins.register(ReDocPlugin(reDocConfiguration))
}

// private fun setupSwagger(it: JavalinConfig) {
// val swaggerConfiguration = SwaggerConfiguration()
// it.plugins.register(SwaggerPlugin(swaggerConfiguration))
// }
private fun setupSwagger(it: JavalinConfig) {
val swaggerConfiguration = SwaggerConfiguration()
it.plugins.register(SwaggerPlugin(swaggerConfiguration))
}

private fun setupOpenApi(it: JavalinConfig, externalContextPath: String?) {

Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ strikt-jackson = { group = "io.strikt", name = "strikt-jackson", version.ref = "
openapi-annotation-processor = { group = "io.javalin.community.openapi", name = "openapi-annotation-processor", version.ref = "openapi" }
javalin-openapi-plugin = { group = "io.javalin.community.openapi", name = "javalin-openapi-plugin", version.ref = "openapi" }
javalin-redoc-plugin = { group = "io.javalin.community.openapi", name = "javalin-redoc-plugin", version.ref = "openapi" }
javalin-swagger-plugin = { group = "io.javalin.community.openapi", name = "javalin-swagger-plugin", version.ref = "openapi" }
javalin-testtools = { group = "io.javalin", name = "javalin-testtools", version.ref = "javalin" }
javalin = { group = "io.javalin", name = "javalin", version.ref = "javalin" }
javalin-micrometer = { group = "io.javalin", name = "javalin-micrometer", version.ref = "javalin" }
Expand Down

0 comments on commit a95cce0

Please sign in to comment.