File tree Expand file tree Collapse file tree 4 files changed +54
-2
lines changed
examples/javalin-gradle-kotlin
javalin-plugins/javalin-openapi-plugin Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ dependencies {
39
39
40
40
// javalin
41
41
implementation(" io.javalin:javalin:6.4.0" )
42
- implementation(" com.fasterxml.jackson.core:jackson-databind:2.15.2 " )
42
+ implementation(" com.fasterxml.jackson.core:jackson-databind:2.18.1 " )
43
43
44
44
// logging
45
45
implementation(" ch.qos.logback:logback-classic:1.4.14" )
Original file line number Diff line number Diff line change 1
1
description = " Javalin OpenAPI Plugin | Serve raw OpenApi documentation under dedicated endpoint"
2
2
3
+ plugins {
4
+ kotlin(" kapt" )
5
+ }
6
+
3
7
dependencies {
4
8
api(project(" :openapi-specification" ))
9
+
10
+ kaptTest(project(" :openapi-annotation-processor" ))
5
11
}
Original file line number Diff line number Diff line change
1
+ import io.javalin.Javalin
2
+ import io.javalin.openapi.OpenApi
3
+ import io.javalin.openapi.plugin.OpenApiPlugin
4
+ import org.junit.jupiter.api.Test
5
+ import org.junit.jupiter.api.assertDoesNotThrow
6
+
7
+ class OpenApiPluginTest {
8
+
9
+ @OpenApi(
10
+ path = " /test" ,
11
+ )
12
+ private object OpenApiTest
13
+
14
+ @Test
15
+ fun `should support schema modifications in definition configuration` () {
16
+ assertDoesNotThrow {
17
+ Javalin .create { config ->
18
+ config.registerPlugin(
19
+ OpenApiPlugin { openApiConfig ->
20
+ openApiConfig.withDefinitionConfiguration { _, def ->
21
+ def.withInfo {
22
+ it.title = " My API"
23
+ }
24
+ }
25
+ }
26
+ )
27
+ }
28
+ }
29
+ }
30
+
31
+ @Test
32
+ fun `should support empty definition configuration` () {
33
+ assertDoesNotThrow {
34
+ Javalin .create { config ->
35
+ config.registerPlugin(
36
+ OpenApiPlugin {
37
+ it.withDefinitionConfiguration { _, _ ->
38
+ /* do nothing */
39
+ }
40
+ }
41
+ )
42
+ }
43
+ }
44
+ }
45
+
46
+ }
Original file line number Diff line number Diff line change 1
1
description = " Javalin OpenAPI Specification | Compile-time OpenAPI integration for Javalin 6.x"
2
2
3
3
dependencies {
4
- val jacksonVersion = " 2.15.2 "
4
+ val jacksonVersion = " 2.18.1 "
5
5
api(" com.fasterxml.jackson.core:jackson-databind:$jacksonVersion " )
6
6
api(" com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion " )
7
7
api(" com.google.code.gson:gson:2.10.1" )
You can’t perform that action at this time.
0 commit comments