sindrenm
09/12/2025, 7:51 AMBruce Hamilton
09/12/2025, 8:00 AMPHondogo
09/12/2025, 12:09 PMEmre
09/12/2025, 1:34 PMBruce Hamilton
09/12/2025, 1:46 PMbuildOpenApi target for generating a spec from your codeArjan van Wieringen
09/12/2025, 2:17 PMsuresh
09/18/2025, 6:21 AMjava.io.FileNotFoundException: Swagger file not found: openapi/generated.json
at io.ktor.server.plugins.openapi.OpenAPIKt.readOpenAPIFile(OpenAPI.kt:59)
at io.ktor.server.plugins.openapi.OpenAPIKt.openAPI(OpenAPI.kt:29)
at io.ktor.server.plugins.openapi.OpenAPIKt.openAPI$default(OpenAPI.kt:24)
implementation(libs.ktor.server.openapi)
...
@OptIn(OpenApiPreview::class)
openApi {
title = description
version = "2.1"
summary = "$description API"
}suresh
09/18/2025, 6:22 AMBruce Hamilton
09/18/2025, 6:23 AMbuildOpenApi that will generate the filesuresh
09/18/2025, 6:23 AMimplementation(libs.ktor.server.openApi) , the final binary size increased from 35 Mb to 50Mb. Isn’t this supposed to be generated at build time..rt?Bruce Hamilton
09/18/2025, 6:28 AMsuresh
09/18/2025, 6:29 AM-rw-r--r-- 1 1.2M Feb 1 1980 rhino-1.7.7.2.jar
-rw-r--r-- 1 1.6M Feb 1 1980 swagger-codegen-generators-1.0.57.jar
-rw-r--r-- 1 3.4M Feb 1 1980 swagger-codegen-2.4.46.jarBruce Hamilton
09/18/2025, 6:32 AMsuresh
09/18/2025, 6:37 AM9.1.0-rc-4 (if that matters), but buildOpenApi still doesn’t generate anything 🤔Bruce Hamilton
09/18/2025, 6:40 AMbuild/ktorEmre
09/18/2025, 4:23 PMgradle kotest and it triggered buildOpenApi. Does anyone know why?Bruce Hamilton
09/18/2025, 5:15 PMbuildOpenApi is itself a compile task, so maybe the kotest plugin is iterating through all the compile tasks... otherwise it's independent and shouldn't be triggered unless specifiedEmre
09/18/2025, 5:22 PMVampire
09/18/2025, 5:25 PMVampire
09/18/2025, 5:25 PMBruce Hamilton
09/18/2025, 5:28 PM-x buildOpenApi when running kotest