diff --git a/templates/android/library/src/main/java/io/package/services/Service.kt.twig b/templates/android/library/src/main/java/io/package/services/Service.kt.twig index 05de594d6..dd54b515e 100644 --- a/templates/android/library/src/main/java/io/package/services/Service.kt.twig +++ b/templates/android/library/src/main/java/io/package/services/Service.kt.twig @@ -43,7 +43,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) { {%~ if method.parameters.all | reduce((carry, param) => carry or not param.required) %} @JvmOverloads {%~ endif %} - suspend fun {% if method.responseModel | hasGenericType(spec) %}{{ '' | raw }} {% endif %}{{ method.name | caseCamel }}( + suspend fun {% if method.responseModel | hasGenericType(spec) %}{{ '' | raw }} {% endif %}{{ method.name | caseCamel | escapeKeyword }}( {%~ if method.type == "webAuth" %} activity: ComponentActivity, {%~ endif %} diff --git a/templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig b/templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig index c5add5d0f..e274fcf95 100644 --- a/templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig +++ b/templates/kotlin/src/main/kotlin/io/appwrite/services/ServiceTemplate.kt.twig @@ -36,7 +36,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) { @JvmOverloads {%~ endif %} @Throws({{ spec.title | caseUcfirst }}Exception::class) - suspend fun {% if method.responseModel | hasGenericType(spec) %}{{ '' | raw }} {% endif %}{{ method.name | caseCamel }}( + suspend fun {% if method.responseModel | hasGenericType(spec) %}{{ '' | raw }} {% endif %}{{ method.name | caseCamel | escapeKeyword }}( {%~ for parameter in method.parameters.all %} {{ parameter.name | caseCamel }}: {{ parameter | typeName }}{%~ if not parameter.required or parameter.nullable %}? = null{% endif %}, {%~ endfor %} diff --git a/tests/languages/android/Tests.java b/tests/languages/android/Tests.java index 73ed1ee5b..0bc41d98b 100644 --- a/tests/languages/android/Tests.java +++ b/tests/languages/android/Tests.java @@ -140,7 +140,7 @@ public void test() throws IOException { writeToFile(ex.toString()); } - general.enum(MockType.FIRST, new CoroutineCallback<>(this::writeMockResult)); + general.xenum(MockType.FIRST, new CoroutineCallback<>(this::writeMockResult)); try { general.error400(); diff --git a/tests/languages/android/Tests.kt b/tests/languages/android/Tests.kt index e98ce59d1..7537c982b 100644 --- a/tests/languages/android/Tests.kt +++ b/tests/languages/android/Tests.kt @@ -135,7 +135,7 @@ class ServiceTest { writeToFile(ex.toString()) } - mock = general.enum(MockType.FIRST) + mock = general.xenum(MockType.FIRST) writeToFile(mock.result) try {