File tree Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -5,24 +5,24 @@ import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask
55import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
66import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
77
8- val ktor_version = " 2.3.12 "
8+ val ktor_version = " 3.0.1 "
99val kotlin_version = " 2.0.21"
1010val kotlinx_datetime_version = " 0.6.1"
11- val kompendium_version = " 3.14.4 "
11+ val kompendium_version = " 4.0.1 "
1212val logback_version = " 1.5.12"
1313val logstash_version = " 8.0"
1414val prometeus_version = " 1.6.3"
1515val nav_common_version = " 3.2024.10.25_13.44-9db48a0dbe67"
1616val tjenestespec_version = " 1.2021.02.22-10.45-4201aaea72fb"
17- val modia_common_utils_version = " 1.2023.07.20-13.43-64707e48b53b "
17+ val modia_common_utils_version = " 1.2024.10.30-08.17-f565fe211cd4 "
1818val junit_version = " 5.11.3"
1919val graphql_kotlin_version = " 8.2.1"
2020
2121plugins {
2222 application
2323 kotlin(" jvm" ) version " 2.0.21"
2424 id(" org.jetbrains.kotlin.plugin.serialization" ) version " 2.0.21"
25- id(" com.github.johnrengelman. shadow" ) version " 8.1.1 "
25+ id(" com.gradleup. shadow" ) version " 8.3.4 "
2626 id(" com.expediagroup.graphql" ) version " 8.2.1"
2727}
2828
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package no.nav.api.debug
22
33import io.bkbn.kompendium.core.metadata.PostInfo
44import io.bkbn.kompendium.core.plugin.NotarizedRoute
5+ import io.bkbn.kompendium.oas.payload.MediaType
56import io.ktor.http.*
67import io.ktor.server.application.*
78import io.ktor.server.request.*
@@ -62,11 +63,13 @@ private object Api {
6263 examples(
6364 Pair (
6465 " example" ,
65- TokenExchangeRequest (
66- cluster = " dev-fss" ,
67- namespace = " teamname" ,
68- application = " app-api" ,
69- ),
66+ MediaType .Example (
67+ TokenExchangeRequest (
68+ cluster = " dev-fss" ,
69+ namespace = " teamname" ,
70+ application = " app-api" ,
71+ ),
72+ )
7073 ),
7174 )
7275 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import io.ktor.http.*
44import io.ktor.server.application.*
55import io.ktor.server.plugins.*
66import io.ktor.server.plugins.callid.*
7- import io.ktor.server.plugins.callloging .*
7+ import io.ktor.server.plugins.calllogging .*
88import io.ktor.server.request.*
99import io.ktor.server.response.*
1010import io.ktor.server.routing.*
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ private val specSerializer =
3232
3333fun Application.configureOpenApi () {
3434 install(NotarizedApplication ()) {
35- spec =
35+ spec = {
3636 OpenApiSpec (
3737 info =
3838 Info (
@@ -47,9 +47,10 @@ fun Application.configureOpenApi() {
4747 ),
4848 ),
4949 )
50+ }
5051
51- openApiJson = {
52- route(" /openapi.json" ) {
52+ specRoute = { spec, routing ->
53+ routing. route(" /openapi.json" ) {
5354 get {
5455 call.respondText(
5556 contentType = ContentType .Application .Json ,
You can’t perform that action at this time.
0 commit comments