diff --git a/modules/openapi/build.gradle.kts b/modules/openapi/build.gradle.kts index a1d126f7..b1df3069 100644 --- a/modules/openapi/build.gradle.kts +++ b/modules/openapi/build.gradle.kts @@ -37,6 +37,18 @@ kotlin { "kotlinx.serialization.json.JsonObject" ) } + filter { line: String -> + line.replace( + regex = Regex("(@SerialName\\(value = \\\"(\\w+)\\\"\\))"), + replacement = "@JsName(\"$2\") $1" + ) + } + filter { line: String -> + line.replace( + regex = Regex("(import kotlinx\\.serialization\\.\\*)"), + replacement = "$1 \nimport kotlin.js.JsName" + ) + } } withType {