From 47fa4930f3072b20271fbbc3f507f0ece8ce1821 Mon Sep 17 00:00:00 2001 From: Fyro Date: Mon, 26 Dec 2022 20:09:01 +0100 Subject: [PATCH] add jakarta implementation https://github.com/swagger-api/swagger-codegen-generators/issues/1054 --- src/main/resources/handlebars/scala/client/api.mustache | 5 +++++ .../resources/handlebars/scala/client/apiInvoker.mustache | 5 +++++ .../resources/handlebars/scala/client/build.gradle.mustache | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/resources/handlebars/scala/client/api.mustache b/src/main/resources/handlebars/scala/client/api.mustache index f67133052c..a82699f9f5 100644 --- a/src/main/resources/handlebars/scala/client/api.mustache +++ b/src/main/resources/handlebars/scala/client/api.mustache @@ -10,7 +10,12 @@ import {{invokerPackage}}.{ApiInvoker, ApiException} import com.sun.jersey.multipart.FormDataMultiPart import com.sun.jersey.multipart.file.FileDataBodyPart +{{#jakarta}} +import jakarta.ws.rs.core.MediaType +{{/jakarta}} +{{^jakarta}} import javax.ws.rs.core.MediaType +{{/jakarta}} import java.io.File import java.util.Date diff --git a/src/main/resources/handlebars/scala/client/apiInvoker.mustache b/src/main/resources/handlebars/scala/client/apiInvoker.mustache index 23dcba8562..c93b0680f0 100644 --- a/src/main/resources/handlebars/scala/client/apiInvoker.mustache +++ b/src/main/resources/handlebars/scala/client/apiInvoker.mustache @@ -14,7 +14,12 @@ import com.sun.jersey.multipart.file.FileDataBodyPart import java.io.File import java.net.URLEncoder import java.util.UUID +{{#jakarta}} +import jakarta.ws.rs.core.MediaType +{{/jakarta}} +{{^jakarta}} import javax.ws.rs.core.MediaType +{{/jakarta}} import scala.collection.JavaConverters._ import scala.collection.mutable diff --git a/src/main/resources/handlebars/scala/client/build.gradle.mustache b/src/main/resources/handlebars/scala/client/build.gradle.mustache index e124eb0a5c..74337b226d 100644 --- a/src/main/resources/handlebars/scala/client/build.gradle.mustache +++ b/src/main/resources/handlebars/scala/client/build.gradle.mustache @@ -48,7 +48,7 @@ if(hasProperty('target') && target == 'android') { } dependencies { - provided 'javax.annotation:jsr250-api:1.0' + provided 'jakarta.annotation:jakarta.annotation-api:{{#jakarta}}2.1.1{{/jakarta}}{{^jakarta}}1.3.5{{/jakarta}}' } }